The answer by Nij already pointed out one important factor regarding when questions about law are on-topic and when they are off-topic: "What is the law?" vs. "Why is this the law?".
But I would like to point out a different aspect which can make a question off-topic: Politics Stack Exchange is not a complaint forum. Politics means looking at the bigger picture, not on individual cases. This means:
A question about why a whole law doesn't get enforced at all in a jurisdiction is on-topic.
A question about why one specific district attorney apparently doesn't persecute one specific allegedly criminal act is off-topic. It's a question which can only really be answered by that one attorney, and if that attorney chooses not to answer, we can only guess what their motivation might be.
The trickier example is IMO the one about sugar baby / sugar daddy relationships and why they don't get persecuted as prostitution. In that case whether it's on-topic or off-topic would actually depend on the answer.
Is it because politicians discourage persecution of this form of prostitution? That would be political.
Or is it more about the practical problems with persecuting people for this which makes it more effort for the legal system than it is worth? Or maybe it isn't actually a crime in some jurisdictions because it falls into some legal grey area? If one of these is the answer, then it would be a question for Law Stackexchange.
However, I think that if someone would post this here on Politics Stack Exchange, it would likely turn out to be one of those questions where people would rather post their personal views on the ethics of prostitution than post proper answers which look at the issue from a political point of view. Would I give the question the mod-hammer? That would depend on how it's actually written. But I would very likely downvote it, because it's likely not the kind of question which encourages good answers.