> I wonder how many actual wars in the past have been started because someone didn't like how the border looked on a map.
Plenty, though it's less about rectangular shapes per se but borders being drawn by former colonial forces with a ruler, splitting ethnic groups and forcing them to live under a new, foreign government. Under colonial rule every unrest was simply stopped by brute force, after "liberation" and division of countries according to some arbitrary border created by drawing a line along a ruler on the map there was no "moderating" force anymore and ethnicities that had ignored/evaded each other for centuries were forcibly mixed and the former colonial force usually decided who was the new government, based on their interest. A great example is Western Sahara:
Spain left and decided "this part goes to Mauritania, this part goes to Morocco". The Sahawri managed to beat the Mauritanian forces and to claim some land, then Morocco "invaded" (in quotes because Moroccans fought the Spanish in the 50s from as far south as Aoussard). Also, officially the border between Morocco and Algeria is closed because of Algerian support for the Sahawri. But in the north of Morocco, in the Rif area, people feel more connected to the Rif than to Morocco and cultural exchange with the Algerian Rif people is much more vibrant than cultural exchange with the south of Morocco.