That's true for the spanish national's ID (the DNI) but for foreigners, even EU ones, it's a huge pain. I've lived in a couple of EU coutries and only Spain asked EU members for a special card (NIE), private health insurance, bank account details, etc
If it makes you feel any better, it can be much worse. I present to you Belgium's bureaucracy! Obtaining residence in Belgium includes circular dependencies (you need bank account and work contract to obtain residence, you need residence to obtain bank account). Multiple visits to the administration for different steps. A visit by the Police to your house (usually during work-hours), including inviting them over to snoop around. And the entire process takes between 6 to 12 months due to the slowness of everything. If you switch from one town to another you have to re-register again (a quicker process that still requires a visit to the town hall) and another visit by the Police to snoop around again.
My experience in the UK and Germany (as a EU citizen and pre-brexit UK) has been that you get there and that's it, you can rent a house you can register with the doctor. There's no special card, there's no police involved. It's how I'd expect the idea of free movement within the EU to work.
I understand the problem with people coming to Spain to just get a surgery but surely for a EU citizen it could be simpler since the idea is that we all have the same rights. I don't think the health system in Spain is much different to the NHS where there's no payment involved.