I don't think it should be considered unlawful termination. Someones behaviour outside work definitely has an impact on the business they're a part of. Unfortunately, whether we like it or not, SW has a very real stigma attached to it that could hurt the business reputation. That's a risk the business must take into account. It's like if someone were to attend white supremacist rallies on the weekends. It may not directly affect their ability to perform their role but I suspect we'd agree that it's justified if a business terminated someone for that reason.
Reputation is one aspect, but another aspect from a business perspective that I haven't seen discussed too much is the effect it could have on coworkers' performance. Say a woman has an OnlyFans and somehow her male colleagues find out. It would be at least a little bit distracting for them and could cause their productivity to drop. This is again a liability the business has to consider.
I'm not saying the stigma or termination is _right_ or _just_ in this case but it's just the reality of the world we live in and it will take generations to change that.
EDIT: To add a little bit about the sexual harassment aspect. I'm not sure where I fall on this. Say a woman works a side job as a stripper and one of her colleagues accidentally visits the strip club where she works. I would say it's not sexual harassment to visit the club the first time when they are unaware she works there. However if they were to solicit a private dance from her then I would consider that sexual harassment. I'm not sure exactly how that relates to viewing someones photos online accidentally vs paying for their only fans but I think it's somewhat similar. And what about repeatedly visiting the club/public photos? Visiting the club again probably is harassment depending on whether or not she is working that night but viewing the photos again probably not if she's not aware of it. It's a pretty large grey area with this part and it's difficult to form a solid opinion or even a rule without assessing things case-by-case.