Anal sex is taboo to many but a requirement for others to a fulfilling sexual experience. Considering you can’t get pregnant from it, it’s a wonder it wasn’t a lot more widely popular than it is. Yet it’s illegal in many places and usually associated with homosexuality though not all gay couples even practice it. Many heterosexual couples however do practice it consensually, so it’s pretty ridiculous to have it be illegal, but unless there’s a cop in your bedroom, I wouldn’t really worry about getting caught or charged with anything.
Some countries will even execute people for committing sodomy. It’s a crazy world we live in when people are expected to hold back with other people they wish to do things with because of some government stance on what they think couples should or should not be doing. It likely comes down to it’s not a procreative act, so therefore it holds no value to humanity. Oral sex is also not a procreative act though, and many have hang ups about that as well.
Men love it because it’s tighter than a vagina and produces more friction and sensation, and it’s also pleasurable for many men to have prostate stimulation either with fingers or toys even if they are not engaged in actual anal sex. Some couples use it instead of vaginal sex when the woman is menstruating if they have hang ups about sex during her period. People do have many hang ups and find their ways around them it seems. Guys will always find a way if they are wanting something up their ass enough. I’ve talked to ones from everything to carrots, to apples to candles up their ass. Inadvisable choices for sure, but many are too afraid to have proper toys for fear their wives would find them.