Driving through rural areas you must have experienced the sudden ~30mph sign, signifying a town coming up. Did this "drive what you feel" approach line up there too? When the town was at the bottom of a hill?
For context, I've done around 25k miles cross-country non-interstate. I've concluded that what the individual states choose to sign as the general maximums has more to do with local culture and politics than with general terrain.
With respect to the engineering safety of the sudden 30mph sign (which I assume is in a rural area on an otherwise small highway); yes that sounds like you're describing what is typically called a "speed trap". A real traffic safety engineering standard SHOULD call for a clearly posted and graduated reduction in speed as approaching the town at a /bare/ minimum. However, a true engineering solution would isolate the town and the highway entirely. The point of the highway is to be a high speed transit corridor and it is inefficient and unsafe to route such a thing through a dense residential or commercial area. Instead there should be an exit system that leads off to a side path for such a town. I would prefer an actual barrier that encloses the typical route and possibly caps or bridges over it (maybe with a park) for existing situations that have developed in days with less good planning. In any such cases a designated detour route should also be constructed such that it is possible for "oversized loads", emergency response teams, and post disaster travel to route around failure in the now enclosed sections.
There are plenty of towns large enough for highway bypasses and traffic lights. The ones I'm talking about have one good road, maybe two if they're lucky enough to be the intersection. I indeed appreciate when there are graduated signs so I don't have to use the brakes, but this obviously costs money they don't all have, and isn't needed by people who already know the road. Talking about traffic engineering is laughable for such places - if your goal is to pass through as quick as possible, you could just take the interstate.
If there was not revenue generation, if the fines were required to go only in to the state or federal general budget, I believe the situation would shift towards one of the safe engineering solutions I outlined above instead of the revenue generating status quo you see today.