Having a basic understanding of how to sample can be a great way of expanding your toolset as a music producer. Some genres rely heavily on it, such as hip hop and Trap/Trap Music. It is not an essential skill, and there are many ways of generating ideas that don't involve sampling.