There’s probably something in the terms about it, and it would take a very expensive legal battle to settle it. And I doubt it has enough legal merit to be taken on as a class-action lawsuit.
So, really, does it matter if it’s illegal? With the asymmetrical power imbalance, they literally don’t need to care about the laws. Realistically, no EU regulator is going to fine them for cancelling “a purchase made in India”, either.
There’s probably something in the terms about it
The Paid Services, and certain content available within the Paid Services, may only be available in certain countries. You agree that you will not present any false, inaccurate or misleading information in an effort to misrepresent your country of residence, and you will not attempt to circumvent any restrictions on access to or availability of the Paid Services or content available within the Paid Services.
Terminations and Suspensions by YouTube
YouTube reserves the right to suspend or terminate your Google account or your access to all or part of the Service if (a) you materially or repeatedly breach this Agreement; (b) we are required to do so to comply with a legal requirement or a court order; or © we believe there has been conduct that creates (or could create) liability or harm to any user, other third party, YouTube or our Affiliates.
I don’t understand these surprise pikachu reactions from some people. If you break the terms of service you are running the risk that the company in question will terminate your service or account at some point in the future. There is nothing controversial or surprising about this, other than the fact that Google has taken so long to get around to it.