Might not end up making Sony any money, but I'm sure an executive is getting a well-deserved bonus off the back of that nice-looking bump in PSN account numbers.
It is free. But they can gather data, get you into their ecosystem, hopefully making it more likely you buy a playstation or other playstation published games. Eventually maybe they want to have cross progress between pc and playstation or have playstation achievements on pc, maybe their own steam like client.
Ultimately these countries are probably responsible for less than 5% of their total sales. Most of them are either tiny or poor or both. It does have countries like Egypt, Albania, Serbia, Morocco and Algeria but most of the banned countries are irrelevant in terms of sales.
They can steal your data if you're logged into a PSN account, and down the line the plan (which they don't want to admit) is to get PC players paying for a multiplayer subscription like on console.