That and 2 minutes of Googling will point you in the right direction generally.
My cars haven't seen the inside of a dealer's service bay in over 10 years, other than for warranty or recall work.
If you own a BMW, for example, the detailed diagnostic information for the rest of the car is sitting on their MODBUS, which is only readable with a very expensive tool and software sold only to BMW dealers.
Whether or not you can service the rest of the car in a DIY or third-party fashion is a commercial concern, not a regulatory concern. I think BMW makes fine cars, but their anti-DIY stance is why I won't own one. (Porsche, Mercedes, and the VW group are more DIY friendly, though still not totally.)
You can get OBD2 readers for not very much money (<$20), which would have let you read the code.
As another example, I had a check engine light on my car. It was ~$500 to check the code fault and replace a sensor. If I had my own access to those codes, I could have done the work myself for a fraction of the cost, but the car manufacturer knows that I'm limited in my options. If I want to renew my car tabs, I'll have to pay them and their service technician to do the work. It's a racket.