Jup, but the EU is riddles with countries saying f*ck all to the rules, and then finally resulting in the eu abandoning them. Like the rule that only so much % of the GDP needed to be kept(GDP dept ratio) in order to keep the euro stable. The Netherlands was the only country abiding to it, so they canceled it all together, and see the debt mountain it is now.. But the EU has a Triple A rating... what could possibly go wrong? It's not like 2008 was all about exactly the same thing with banks that where highly overvalued etc.
The EU has a specific problem with more authoritarian / nationalistic governments. They want to ignore the pesky democracy rules with EU membership but know that leaving the EU will be a disaster. So they will dance along the line to see how far they can push.
The Euro rules are a bit different. Firstly, the debt mountain doesn't reside with the EU, but EU members. The Debt / GDP ratios are a good rule, but every country has been busting them for years in and out of the EU (first financial crash and then COVID).
The EU AAA rating is for EU debt - not EU
member debt which is different. That is, the borrowing that the EU does itself. The EU borrowing is relatively modest and the EU rules for repayment are stringent so the debt is classed as low risk. On the other hand, EU member debt ranges hugely from AAA to around BB. This is the debt that each member state has via borrowing. Germany has a far better credit rating than Greece. The picture is complicated by the common currency in the Eurozone in that investors in Greece pre-crash were rating their credit-worthiness higher than they should have because they believed the Euro was being implicitly backed by more stable economies by virtue that they also were using the currency.
The financial crisis was generated by the private sector. Governments may not have helped by their lax oversight, but make no mistake - the people who crashed the economy were those having a party with sub prime derivatives. And the massive mis-valuation of these "assets" by ratings agencies who were in the pocket of the very people asking for the ratings. Government borrowing ballooned because governments bailed out these idiots to stop the whole financial system collapsing. And then the government debt was paid back by raising taxes and reducing spending on pretty much everyone except those who caused it in the first place.