Officially you don't have that universal healthcare as a non-resident. Reality is hit or miss.
As most EU medical systems are not really geared toward private billing, if you go to a government-run medical centre for something small, it's going to be more effort for them to figure out how to bill you, so they don't.
Sometimes tourist-heavy places will definitely be set up to get you to pay, other times they just see treating actually minorly-ill tourists for low/no-cost as a cost of being a tourist-dependent area.
Sometimes the anecdotes about only having to pay 20 EUR at the hospital were really the salaried clinic doctor squeezing some EUR out of you that really should have been paid to the state.
Other times, if you go to a private-clinic doctor solo, they'll likely make you pre-pay. But if it's your local family's doctor, they may see you for free on a goodwill-basis, or fraudulently bill your local family member's plan and/or write any prescription in their name.
I went to the medical center and then a hospital multiple times while on a month long trip in Spain and Portugal -- came down with a weird bronchitis thing affecting my breathing.
It was 100% free. So I definitely got free health care on a tourist visa as an American.
Officially, they will only treat life-treatening problems for free, for tourists.
In reality, if the person doesn't seem to be trying to take advantage of the system, I'd not be surprised that hospital staff don't bother sorting out billing the patient.
I'm not sure why there is an assumption that the health care is good in Portugal. Purely annecdotal, the only Portuguese person I know moved to UK to work as a cleaner. She couldn't find work in Portugal that would pay enough to allow her to survive. Also she moved her dad over too because he need health care and needed to be near family. I've never looked into, I just assumed that the economy and it's health care aren't great.
As most EU medical systems are not really geared toward private billing, if you go to a government-run medical centre for something small, it's going to be more effort for them to figure out how to bill you, so they don't.
Sometimes tourist-heavy places will definitely be set up to get you to pay, other times they just see treating actually minorly-ill tourists for low/no-cost as a cost of being a tourist-dependent area.
Sometimes the anecdotes about only having to pay 20 EUR at the hospital were really the salaried clinic doctor squeezing some EUR out of you that really should have been paid to the state.
Other times, if you go to a private-clinic doctor solo, they'll likely make you pre-pay. But if it's your local family's doctor, they may see you for free on a goodwill-basis, or fraudulently bill your local family member's plan and/or write any prescription in their name.