Various reasons: for consumer goods/services especially, it'll be a large dose of "corporate virtue signalling" and therefore PR value, but there are also some quite practical reasons.
It's not actually easy at all, doing business with a country that's subject to strict international sanctions. Most large corporations, for instance, will operate local subsidiaries in target countries. They'll also, often, sell to other local businesses rather than directly to the consumer. Money needs to flow in and out. Supply chains have to function. It's all rather risky businesses when any number of factors necessary for you to operate could fold under pressure, or fall victim to new sanctions on any given day.
When you're thinking of something like OnlyFans in particular, it's also, essentially, a media platform business. Sure, it's mostly known for a particular type of content - but there's nothing about the technology as such that means it can't be used to propagate political content just as easily. You could always deliver your criticism of Putin and news on Russian set-backs entirely naked, just to keep in with the general branding situation. As a business, at that point, you're looking at a legal risk, might be banned, fined or otherwise sanctioned ... so why not pull out first and get some PR for it? It makes good sense!
The firm that has pulled out that I am most familiar with is more in the B2B space. Sound business decision in my mind: total value of the Russia business was minuscule in comparison to the overall operation, local client base consisted of "likely to be folding under sanctions", and it's not exactly as though anyone internationally is queuing up to have their business served from Russia at present.
I'm not saying sanctions and withdrawal of businesses don't hurt average citizens. They do! The very notion of "smart sanctions" is pure hypocrisy. What I am saying is that sanctions are essentially the modern equivalent of medieval sieges: literally starving the other side to death may no longer be the goal, exactly - systemic collapse to force them to their knees absolutely is.