Which EU law say that exact thing?
Because now I live in an EU country that had (and has) foreign products and services, typically of US origin, that are not officially available in my home EU country, like for example Xbox GamePass for console. Was same with Nextflix till a few years ago. Same with AMEX cards.
So NO, you can definitely provide your services only to specific EU member states if that's what you wish, they can't force you to sell in all countries.
You're right but there has been some progress in that matter.
I.e. streaming providers can't stop you from watching Germany exclusive Netflix content when on holidays in Greece using your German Netflix subscription (only free/ad supported services are allowed to do that)
It's called the Shop Like a Local rule, from 2018.
Basically, Apple can stop selling developer accounts in Italy if they wish. They might run into issues on discrimination grounds, but it would probably be a long fight.
However, they can't prevent an Italian developer from purchasing a developer account from another EU country.
https://eur-lex.europa.eu/EN/legal-content/summary/geo-block...