This taboo on discussing controversial things at work may be a cultural matter. A former co-worker - originally from another country - said that where he grew up and began his career discussing - even arguing - politics at work was an everyday thing, even between people who disagreed strongly. According to this former co-worker, in the culture of his younger times people didn't hold grudges against people who disagreed with them politically and got along well when the discussions and arguments were over. However, it seems that here in the United States many (but certainly not all) people find it impossible to disagree with someone without creating hard feelings which sometimes persist for a long time. Thus, the unwritten rule we have in the U.S. and other countries.
The reason people recommend avoiding controversial discussions in the work place, especially with the boss, is the possibility of trouble. Recent news articles about a woman who was fired for voting the wrong way support that problems happen sometimes, especially when it is the boss with whom you have different opinions.
Having said all that, I've realized that I've often worked in places where politics is not so taboo. However, I've usually worked in places where there is wide (but not unanimous) agreement for most issues. In the other places I was fortunate enough to be either in a place where differing viewpoints were respected (or at least tolerated) or where I was able to avoid getting pulled into controversial conversations.
So, my advice is to avoid such conversations as much as possible, especially when you're new and still determining what sort of people you work with. If confronted on the issues during this time, or if you've decided that it isn't safe to discuss such issues, politely decline - saying something like "Sorry, but I prefer to avoid political discussions at work." should be respected. If you determine that you work in an environment where you're safe to discuss controversial matters, then proceed if you want, but remain respectful; also remain wary of bad feelings arising and cut things short if that happens.