Urine is not sterile. Popular myth though.
A urologist debunks the claim that urine is sterile, along with other myths you may have heard about the curative potential of pee.
health.clevelandclinic.org
Yeah, but the full story is more interesting. We didn't actually
know this until about 2012. It was suspected earlier, but not really proven until then. (I think this came out of Loyola.) The way this was tested is actually pretty interesting ... if you're into microbiology and RNA sequencing. It goes to show you how many discoveries are yet to be made that we only showed what microbiomes bacteria are in common urine ... just a few years ago.
As this pertains to urine's safety, that is a more nuanced question. (I'm going way off on a tangent, so feel free to walk away at this point.)
The bacterial load really isn't the issue. The issue is the nitrogen and phosphorus content. These are actually essential to the ecosystem, but only in normal concentrations. (There is a distinction between freshwater and saltwater environments as to how beneficial they are, but at the volumes we are talking about, I think the distinctions are trivial.)
The issue with urine overboard is one of concentration. If you pee overboard - that isn't a problem (unless you fall in). If everyone in a crowded anchorage/marina does - that's a problem (unless everyone falls, then it is funny). If you pee once, directly - not a problem. If you fill a holding tank and empty that into the water - that's a problem.
Any ecosystem is (or should be) adapted to certain local levels of nutrients. If you dump a concentrated quantity of nitrogen and phosphorus, that risks upsetting that balance. If everyone does it in the same area, that ensures a disruption.
The bottom line: Legally, there is no distinction between urine and fecal-contaminated waste. But, ecologically, it is all about concentration. So, if you must do this and don't care about the legality, do it away from other boaters, away from shorelines, in deeper water, and in small quantities.
But, the caveat is that once urine goes into a holding tank, you no longer know what is in it. So, please, never empty your holding tank into the water in defiance of the law. If you do, don't tell me because I will come scuttle your boat.