"where it is good for him" — from an inferior location to a superior one.
(Devarim 23:18) "There shall be no harlot from the daughters of Israel": You (beth-din) are exhorted (to keep harlotry) from the daughters of Israel, but you are not thus exhorted vis-à-vis gentile women. "and there shall be no harlot form the sons of Israel": You are exhorted vis-à-vis the sons of Israel, but not vis-à-vis Canaanite men. Why mention both kadesh (a male harlot [homosexuality]) and kedeshah (a female harlot). If you (beth-din) are exhorted vis-à-vis a kedeshah — of lesser stringency — in Israel; how much more so are you thus exhorted vis-à-vis a kadesh, (who is subject to the death penalty)! Or, conversely, if you are not exhorted vis-à-vis a Canaanite kadesh — of greater stringency, then how much more so are you not thus exhorted vis-à-vis a Canaanite kedeshah! (Why, then, must both be mentioned?) Both are necessary. For if only kedeshah were mentioned and not kadesh, I would say: You are exhorted vis-à-vis a kadesh — of greater stringency — in Israel; but you are not thus exhorted vis-à-vis a kedeshah — of lesser stringency. Or, you are not exhorted vis-à-vis a kedeshah — of lesser stringency — among the Canaanites; but you are exhorted vis-à-vis a kadesh — of greater stringency among the Canaanites. It is, therefore, written "There shall be no harlots from the daughters of Israel, and there shall be no harlots from the sons of Israel" — and you are not thus exhorted vis-à-vis the Canaanites.