The East, mainly China, became extremely well known for their silk in ancient times. They farmed silkworms with such skill that there is hardly any other places in the world that can do it as well. With the many years of handling them, and even children farming them, do people have silkworms as pets, or are they more of a farming use? Well, yes, you can have silkworms as pets, but it is not going to be the most interactive or exciting pet that you could own unless you have a special interest in them.
The main problem with having silkworms as pets is that they are not the easiest to get hold of. As they are a pretty niche pet, you are more likely to find them for sale online than you are in your local pet store. However, always try to get eggs, as opposed to cocoons, as they may arrive dead. Ask the seller what temperature and humidity they were born in, and try to keep it as close to that as possible. They can live almost anywhere, providing that you have enough food for them and they cannot escape. So, yes, people do have silkworms as pets.