Because we don't have laws to cover every conceivable thing someone could do (no pun intended). Until relatively recently, there was no way to even know this was happening.
I don't remember the exact name of the episode, but there's an episode of the Podcast Behind the Bastards that goes into this - specifically about one dude who did this sort of thing to a crazy degree. I think it was tilted something like "All fertility doctors are bastards", which the host admitted was quite hyperbolic but that he felt it was somewhat true due to the lack of regulation in the industry.
Edit: I think the episode was specifically about the guy this article is about.
It is illegal. Just off the top of my head fraud definitely probably an argument for battery or some form of sexual assault in most if not all jurisdictions.
It's not even illegal for doctors to just use their
own sperm in most states. There's no reason to spend money on a test that shouldn't need to be ran.