Courtesan, in modern usage, is a euphemism for a kept mistress or prostitute, particularly one with wealthy, powerful, or influential clients.[1] The term historically referred to a courtier, a person who attended the court of a monarch or other powerful person.[2]
https://en.wikipedia.org/wiki/Courtesan
A courtier might not necessarily exchange in sex with people she is not married to for political favors
But since that probably happened so often
Might be why courtesan is slang for prostitute