Why do politicians gerrymander districts?
State legislatures get to determine where their congressional districts are. The party in power often draws the district lines so that they can get as many supporters as they possibly can into each district. For instance, a state legislature might make a district combine the east and south sides of a major city, but not the center of the city. This would be because those parts of the city would be majority Democrat or Republican. The result is really weird looking district maps. Parts of the state that shouldn’t be in the same district are. It’s perfectly legal, but everyone hates it. And each party tries to do it once they’re in power.