Muhammad (saw), after taking Mecca back from the polytheist Meccans, went to the Kaaba and smashed the idols there and erased all depictions of people and/or gods used for worship too. On the surface, it is intolerant and uncalled for but then you read the rest of his life and the history of the Muslim community up till then, you find that Muslims were suffering and facing intolerance in Mecca long before this event and many died or were horribly maimed. They were even starved to death at one point.
This was because they believed in One God as opposed to the 360 or so gods that the Meccans had placed in the Kaaba. They publicly announced their disbelief in them and their belief in Muhammad (saw) as the prophet of Allah. The Meccan leaders and their faith and ideology had a strong grip on society and this new faith which was much kinder to the general public, had a much different belief system, and did away with many practices they held sacred for a long time was hurting not only their influence and prestige but their business as Muslims preached to all that came through Mecca as well.
The Kaaba was a shrine that the Meccans, Muslims included, and many Arabs from all around, believed was built by Abraham (as) and his son Ishmael (as) from whom most Arabs derived their ancestry. Muslims said he built it for monotheistic purposes as the first house of worship towards One God while Meccans believed that on some level but also gained the belief overtime that they needed intercessor gods to communicate to Allah and so those gods took on their own importance over Allah.
The people who ran Mecca were also in charge of the Kaaba. So whoever gained control of Mecca had the right to run the Kaaba as he/they pleased. So coming to the point, the Muslims didn't just rise up and break the idols out of some modern day Mullah rage like with the Taliban and the Buddha statues, they were heavily persecuted, forced to flee Mecca with many of them having only the shirt on their back, and then instigated against by the Meccans and their allies.
They came to a peace treaty eventually which did not stop any persecution that was still happening in Mecca or other tribes but stopped hostilities. A Meccan ally broke that treaty, a treaty in their favor, by attacking a Muslim ally and so the Muslims came to Medina in force prepared to fight if they had to. However, Muhammad (saw) made peace with the Meccan leaders and took control of Mecca without a fight and so to came the Kaaba in their possession. In this case, they had a right to remove anything they did not think belonged in the place of worship under their custody. If I bought a church to make into a mosque, I wouldn't keep the statues of Jesus (as) or Mary (ra) or the glass windows with the saints in them. Of course I wouldn't just break them either though in this case, there are plenty of Christians around and breaking their statues wouldn't do anything to their faith but it would piss them off.
That is the other thing that people don't understand. The Meccans' instigation against the Muslims was made into a very ideological fight. For example, Muslims fought the Byzantines and the Sassanians but they didn't do it for their faith and one proof is that they spared their places of worship (not including sporadic cases here and their of violence). Even after taking Arabia, many people were still polytheist with idols elsewhere remaining and they were not destroyed until they themselves converted to Islam eventually. Basically the logic was simple for the Meccans, if they won, their statue dieties were above Allah as being the All-Powerful God Muslims believed him to be and if they lost, they'd see, as they did after the statues broke, that the gods they put so much faith into for squashing the Muslim influence were powerless.
In fact, in one battle where they thought they had killed Muhammad (saw) and his closest companions, they were chanting loudly how their god Hubal had brought them victory over the Prophet Muhammad (saw). Muhammad (saw) infuriated that the Muslims said nothing in return told them to respond that God is greatest despite the Muslims being in tough spot and knowing that, the Meccans retreated anyways also quite possibly because their faith was shaken visibly and audibly from Muhammad (saw) being alive and the Muslims still having fight in them despite taking a beating.
Going back to the civil war analogy, slavery as an issue was diverted a lot by the southern elite in an attempt to legitimize breaking away from the Union in the eyes of the masses who didn't give a damn about slavery because most were economic slaves themselves. The Emancipation Proclamation, while it did not free the slaves, returned it to front and center as the issue of the war and why the South actually split. The point was driven even further home when blacks troops were enlisted to fight in many engagements as they were literally now fighting for their rights against the abominable institution of slavery the southern elites seceded for in the first place. They too had their influence and prestige to maintain at the expense of the welfare of the average people.
To sum it up, the Muslims destroying the idols was not an act of intolerance but a political and ideological one that both sides understood just fine both because of their culture and how they let the conflict go in the first place and it was not a practice that happened over an over generally speaking either.