I have stayed at quite a few campgrounds that have pay to use showers. They are usually located near areas that get a lot of hiker traffic. It is easier to charge everyone to use the shower than to try and police the area to keep the hikers out.
Yellowstone's campgrounds all have pay to use showers (if they have any) but you pay to get in and stay in the water as long as you want. You get two free shower tokens with every night of paid camping.
The campground at Badlands NP is run by a private company and they charge for showers. They have a severe water shortage there.