Well, this is a bit of a misconception. Dogs don't dislike crates, in fact, if they do not like going in their crate it is likely because of the way you have taught them to think about their crate. A large amount of dog owners use their crate as the standard place for their dog bed, and the place they will often go to seek comfort or shelter from things that would normally scare them. This is all a question of how you approach it, and how you use the dog's kennel in general. The key is to treat the kennel like their safe space, their place to retreat, as opposed to a place only for travel or punishment.
The Root of the Behavior
When you use it for only those reasons, the dog will not like going in the crate, but rather run from it as they see it as a punishment. This is common in dog owners who put their dog in a kennel or crate each day before they leave the home. It occurs when dogs are put into them when they misbehave or destroy something around the house. This area can easily become their favorite place inside the home, it just matters how you use it. Try and make the crate or kennel more like a bed or home for your dog. Try to place some toys and games they like around it, and move the kennel to a lesser trafficked area of your home. Place their usual dog bed and favorite blanket inside the kennel and always leave it open for them to go to. They will, over time, use it more and more and become more comfortable and happy in the kennel. It will become easier to get them to go to the kennel, and they will often go into their kennel of their own accord.
The key is to not treat the kennel as a tool for punishment or restriction. If they soil your carpet and you become upset and place them in the kennel, they will learn that they did something wrong, but also learn to dislike the kennel and see it as a form of punishment. This is the type of thing dog owners often overlook. They see the kennel as a convenient place to get the dog out of the way and not running around without taking into account the perception their dog will get of the kennel. Building it into a comfortable and safe spot for your dog to retreat to will do great things for their stress and anxiety as well as keep it a happy place for them to be.
Encouraging the Behavior
After you have turned the crate or kennel into a little indoor dog home for them, then the next step is to get them to enjoy going to it. This will happen a bit over time as well as with a bit of work. Leave the kennel open, but lure them in there a few times with bones, treats, or chew toys they enjoy. Once they realize you are not going to close them into every time they enter, they will become much more likely to go there on their own volition. Praise them and give them a reward for entering their kennel. Make going to their kennel fun instead of solely for a purpose. Play some calm and relaxing music near their kennel, as this will help them with stress and anxiety when they are there. These best practices will quickly instill the best behaviors for your dog and their crate. Taking your time with this training is important and nothing will happen overnight. With continuous training and these best practices, the change and behavior will come, and rather quickly, but not on your first attempt. This type of training is best done when the dog is yet a pup.