It's the by-product of a digestive system at work. In fact, farting is healthy and good for your body. Your body produces gas as part of breaking down and processing food. You also swallow air when eating, chewing, or swallowing.
The most likely reason we like the smell of our farts is simply because we habituate easily. That means that if we fart all the time—which we all do, around half a liter a day—we're very used to the smell already, says Loretta Breuning, Ph. D., who writes about brain chemistry and the social behavior of mammals.