It was canceled because of budget issues and also the fall of the USSR itself. USSR wasn't really doing too hot at the time, economically. Not because it was dangerous. It was obviously proven space-worthy.
The only boondoggle was not iterating on the design, especially when they couldn't launch intelligence payloads to polar orbits. They should have kept the original fleet and been given funding to develop another one - a "space car" for the Shuttle's "space truck" - that could ferry lighter payloads and a smaller crew to more varied orbits.
I used to think like you but I've grown to like the Shuttle. Without it things like the final Hubble repair and building the ISS would have been a lot more complicated. Yes, it was a very ambitious design with more fatal flaws than we'll ever really know about - what if it had had a major issue in orbit - it kept the dream of manned spaceflight alive, and built a ton of experience at NASA for managing manned spaceflight.
The biggest downside I see to the shuttle is how it blocked anything better. Spaceflight got stuck in a local maximum for 30 years, possibly solely to enrich certain congressional districts and well connected contractors. True reuse is needed to make manned space travel possible to more than a few elite astronauts, and the shuttle never had that.
I think we're seeing two sides of the same coin: The fact that we didn't keep designing new spacecraft is the problem. And I wouldn't blame the shuttle for that, just the American people for losing their zeal.
I blame the politicians like Richard Shelby actively preventing any other technology from being used or even considered. The lack of zeal was from the people in charge of the money, who clearly had no interest in space beyond its ability to get them and their pals larger McMansions on a golf course somewhere. Myopic, stupid and corrupt assholes.