There are a whole lot of what-ifs that inform this decision.
If the most socially, politically, or religiously conservative person were to read you book, would they find content that offends? (My local library used to have a problem with a borrower who used a Sharpie to redact words, phrases, and entire paragraphs they deemed offensive.) Whether it's the words you use, the words they use in dialogue, who your characters are, or what they do as your plot unfolds, you might be surprised at how some people take umbrage. (How dare you have a gay/trans/disabled/PoC/atheist character? Seriously? Yes.)
Now imagine that person has some impact on your professional life. What if they talk to your immediate supervisor about your low standards? What if you teach and they're a parent? What if they're a work colleague? What if they manage your branch of the business, or own the corporation?
And last, of course, is whether what you write could negatively impact your relationships with family, friends, and others you care about. Will your great aunt be shocked at the violence? Could anybody tease your child about a non-sexual scene with a naked man? Will your ex see himself or herself in a sex scene or an argument between characters?
Assuming you pass all of those levels of concern, the final consideration is your privacy. It's lovely to have people know you wrote a book that's selling nicely. You feel pride at each acknowledgement (and you earned that right!). But I bet it's not nearly so fun if you become a "name" author. It's probably difficult for J.K. Rowling to run to the market in sweatpants when her hair's filthy, lest she be recognized, right?
Maryn, whose name isn't even Maryn
The USA (at least) is a pretty divided place these days, and social and political writing that supports or diminishes a point of view can cause some rankling among those you know, or within a demographic. While you may want to avoid the side effects that might affect relationships or your career, another way to look at it is that your writing may spur conversation. IMO the best way to do this is to
not write as if you are preaching atop a soap box, but just tell the truth about a situation without editorial comments. In other words, don't write propaganda, but tell a story instead. Your readers can think for themselves, let them form their own opinions.
I have friends and relatives on all sides of every contentious point of view, and my books have stirred the pot a time or two. Can you guess what happened? We talked openly and honestly about a particular issue; no one's mind was changed but we certainly fleshed out our beliefs and know why we believe them. AND we are still friends.
<Indianroads is preparing to duck and run, but has a little more to say>
On the topic of pen names, there are pros and cons either way.
If you risk losing friends, I suggest finding new friends.
Blood relatives and in-Laws and such are a different story, but they probably know your POV already, so they won't be surprised.
Otherwise, people with a closed mind usually don't read, or are strictly stuck in a genre that supports their beliefs.
As far as people defacing your books at the library - IMO this sort of thing is driven by fear and self hatred, and neither of these afflictions can be cured by you. If your book is censored at the library, send them another copy.
I have pride in my writing, and so use my real name. Initially I was a little concerned about all the above, but I took the risk and am glad I did. An old saying that may, or may not be appropriate is: If you hang your ass out far enough and long enough, sooner or later someone will come along and kiss it.
<Ok - now Indianroads (aka Ken Barrett) is running for the hills>