How and why have the political ward boundaries changed?

Wards are just like any other political division, though they are perhaps the smallest politically-relevant one possible.

As with other political boundaries, they are subject to be being redrawn by the political entity responsible for them. In this case, wards are almost always a function of city government, though in rural areas, they can often fall to county government.

What triggers a ward redrawing can be myriad: requirements from the city/county charter, state-level requirements, or even merely desire by the responsible government entity. Typically, changes in resident population are the most common, though they can often also be a result of zoning and redistricting changes. Wards may also need to be redone when the "owning" government entity changes, so (for example) if a formerly unincorporated area is brought under control of a city government, new ward boundaries are likely to be created.

Note that wards are mostly irrelevant today - they almost always serve merely as a convenient way to determine where voting is done for local residents of the ward, and little else. Consequently, there is generally very little incentive or desire to redraw existing ones.