Writers write books that come to them. Usually, they are plotted out long before the writing actually begins. The outside world is busy doing whatever it does. Once in a while, it impacts whether it's a good time for that book to come out.
A few weeks ago I saw where a writer was concerned because her hero was a police officer. Should she change it, she asked, as right now the police are under attack as not being the good guys, which they were thought of when she began the book. Things can change fast.
I ran into this in 2015, when I had written a book where the hero fought for the South in the Civil War. He had been living in Oregon where he was establishing a ranch but was called back to Georgia by his mother who feared her health was failing and was worried about two of his brothers, who had already joined the Confederacy.
In March of 2015, protests erupted over a death in police custody. Violence followed as the anger spread from the police to the South and the Civil War where people saw them as fighting to defend slavery. Not an uncommon belief but not that simple about the South in the 1860s.
That wasn't my problem as I'd already heavily researched my hero's situation. My problem was my hero was a Rebel in a modern time where that was seen as being a traitor.
It was impossible to change the hero and his background. I had written good reasons why he fought for the South, which did not include defending slavery. Although his family owned a plantation, they had freed the slaves that came with it when they arrived, after all that they'd gone through in Scotland. Oppression to people had no appeal to them. But he did fight for the South and that would make him not a hero but a bad guy in the eyes of some. How much would that impact the sales of the book, I asked myself a little selfishly. Should I delay its publication? Would it matter if I even did?
It's ironic when you write a book and suddenly the outside world impacts how people will see it. I've seen that a lot with older romances that are judged by today's standards. Sometimes it leads to condemnation of the authors and sometimes not so much.
When we hold people today to standards of the past nobody is safe from condemnation, which recently has included George Washington because he owned slaves back then.
Anyway, I kept my book as it was, brought it out in September and don't know if it impacted sales for him to have been a confederate soldier. The book begins when he returns to Oregon to see if the woman he left might still love him.
In the plot, I had plenty of opportunities to bring out how Oregon saw the South and any Southerner. Not to mention, my hero's surviving brother was half black. When the baby's mother had died at birth, he'd been raised with the hero and his brothers as an equal because of the nature of the hero's mother. I had a lot in that book about prejudice and felt it painted a fair picture of the times-- which were different than ours.
One point many did not know is that Oregon had a law that lasted into the early 20th Century that blacks could not own property. So while the people felt proudly anti-slavery, they also were racists to keep such a law. Some don't know that there are still property deeds, which ban the owner from selling to a minority-- ignored today, of course.
I think sometimes having something negative in a story can be positive for what it can teach. That though may not help sales. :)
Although the link is to Amazon, this book is wide and has a paperback.