I have been thoroughly line-editing a debut novel of mine entitled ISA for which it's about a persecuted Christian living in Saudi Arabia, and I have commented a lot on the social structures in Arabia in this book. My socialist politics are very present in this book, and I was wondering since I explored a lot in Saudi society in this book, would it be banned if I ever try to publish it? How do books normally get banned in certain countries?
You should know that Harry Potter is on a Christian blacklist for promoting sorcery. There are many cultures around the world, and they all have some form of censorship. Just look at America vs Japan and how their rating systems differ.
If you want a book that everyone likes, you're going to have to avoid every controversy in every country.
You will offend people when you voice your opinions. So you can either write the book in line with the censors' views, perhaps make a few bucks selling out your beliefs, or be honest and likely get some hate mail.
If you have not offended someone, you have not made a impact.