

Let’s say you have 2 districts (A & B) that border each other. And let’s say each district has 100 voters:
A. 90 R & 10 D
B. 45 R & 55 D
R & D tied. 1 district each.
If R wants to win both, they redraw the line to give district B some of district A’s voters:
A. 70 R & 30 D
B. 65 R & 35 D
R just won both districts due to gerrymandering

Who ever is in power at the time unfortunately. California and Texas have both been in the news over redrawing their districts recently to give themselves an advantage. Each side gerrymanders so they won’t agree to abolish it.
There’s a bunch of factors but if I had to choose one reason, it boils down to low voter turnout. In the example I gave above, imagine that the 100 voters in each district was less than half of the eligible registered voters in each district.
Gerrymandering doesn’t mean you automatically win, it just means you have an advantage. If a district has a lot of swing voters or higher voter turnout than usual, it can work against the party in power that redrew the lines.