I'm not speaking in terms of Starfleet regulations, although he broke a lot of them (and I do think they could prove this in court beyond Stamets' testimony, given Mudd *did* have the temporal device on him, the theoretical possibility, etc.), I'm more speaking in terms of how you end an episode without any moral repercussions whatsoever. They treat him like TNG treated Q. But unlike Q with his horrible powers, this guy is actually just a guy. So why the hell are they treating him like a quasi-god, all too happy to see him go away? From the audience's point of view, there's not even the proper ironic twist that was foretold beforehand about how he wasn't really craving for his wedding, and letting him be married with someone he obviously didn't want to. If that was what was intended in writing, it wasn't well executed, it seems that he'll be fine. It would have been comedic for a horrible woman to show up and demand her wedding, Mudd visibly horrified but left with no options. At least in that sense, the lack of consequences would have been substituted by a joke on how marriages can be just as horrifying as any other punishment. But not even that.