Was looking on very reputable website for kids sports.
Clicked on what I thought was an ad and got porn. Finally had to delete Teamsnap app to get rid of it.
How could this happen on a website?
You'll want to install a safari content filter / content blocker to prevent advertisements and/or javascript from sites that are advertisement supported and possibly pay for access if they detect ad blockers.
I have a high opinion of both the 1Blocker and Adamant for iOS and you could use one or the other or both depending on your needs.
I would say the vast, vast majority of hijacked web sessions is advertising related. Compromising them is so easy for people with a little money and a lot to gain for forcing people to see content they didn't expect on a site.