If you've ever caught yourself smelling your own farts, don't be embarrassed — it's good for your survival.

People like the smell of their own farts because the smell is familiar to them. But why other people's toots are unpleasant has to do with how we're wired. When you get an unexpected whiff of gas after someone else rips one in front of you, you might subconsciously think you are in danger because bad smells signal trouble to your brain, according to a viral video published by popular YouTube page AsapSCIENCE.

Farts and the smell bias

We like our own farts because, well, they are ours. "Simply put, the more familiar you are with something, whether it be a song, picture or even a smell, the more likely you are to prefer it," the video said. "Because the bacterial population in your body producing these smells is completely unique from every other individual, our farts truly have a one of a kind brand that your nose can differentiate."

But when other people fart, you're likely put off by it because your body interprets the negative stench as potential danger. "When you think of it, most things that don't smell good aren't good for you," the video continued. "The greater the risk of disease, the more intense your response will be."

Believe it or not, some farts can spread pathogens tied to tonsillitis, scarlet fever, heart disease and flesh-eating disease which are expelled through small particles of fecal matter in the air, according to the video. Fortunately, because most of us wear underwear this isn't a concern, but it probably was for our naked ancestors which is why the brain told them to flee when a unidentified fart occurred.

So, humans have evolved to prefer certain smells. "It's important that we've adapted to like our own odors so that we can maintain proper hygiene," the narrator continued. "In the same way, mothers perceive their children's poop as less offensive than others, which allows them to take care of them without disgust."

In the brain, anterior cingulate cortex processes surprise signals and also plays a role in how we respond to other people's farts. In other words, when we fart, we know it's coming and can anticipate a bad smell. When others fart silently and it smells, however, we are taken by surprise and unprepared for it.

"When somebody rips a silent but deadly fart into a crowded room, the brain's expectations of reality are smashed by the negative stimulus, making it all seem more foul," the video explained.

Why some farts are smellier than others.

Some farts can be more pungent based on the types of food you're eating, as ATTN: has noted before. Foods high in sulfur might make your farts extra smelly, and the same goes for food with lots of sulfate.

Purna Kashyap, a gastroenterologist at the Mayo Clinic, told NPR in 2014 that smelly farts can be helpful in reducing the amount of air in one's stomach. Farting can also mean that our gut microbes are working well.

"Eating foods that cause gas is the only way for the microbes in the gut to get nutrients," he said. "If we didn't feed them carbohydrates, it would be harder for them to live in our gut."

Flickr/astrocoz - flickr.com

Even though there's a great societal stigma surrounding farting, which is often viewed in pop culture as a shameful thing to do (especially in front of romantic partners), it can be good for us. Besides, everybody does it, just like everybody poops. In fact, the average person farts around 14 times a day, so if you work in a crowded office, chances are that people are farting around you all day long. Wake up and smell the roses.

Watch the full AsapSCIENCE video below: