Escort work walks a grey area where being legal is concerned. The blur in the lines of escorting is akin to the blur in the lines of escort services versus prostitution. This means that any possibly applicable laws and sanctions would be those related to prostitution.
It is important to establish that the sentiments expressed here are not absolute. This is simply because the laws surrounding the sexual services for hire vary from country to country. For example, in countries such as Germany and Latvia, prostitution is not only legal, but it is also a regulated industry (with standards, taxes, etc.). Standing at a weird middle ground is a country such as Japan, where all forms of sex for hire a legal except vaginal sex. On the zero-tolerance end of the spectrum, exists countries such as Jamaica and Thailand, where the practice is illegal.
As stated before, the real concern is the sex for hire concept which is what can be deemed as illegal. This is where escort services can be deemed as legal in even countries where prostitution is illegal because of the nature of their profession. The truth is it all comes down to the intention and what is being communicated. Consider a woman walking the streets as you drive up to a red light. As you stop, she knocks on your window. You roll the window down and she offers to sleep with you for a price – even letting you know the deal of the night. This is illegal as it communicates a desire to perform a sexual favor in exchange for monetary compensation. Now consider a woman who advertises companionship in exchange for money. When you contact her, the heart of her offering is spending time with you. In taking up such an offer, it is quite likely that you may have sex with her. However, in contrast to the prior example, this is not what was being offered as the core of the service.
Of all the reasons escort services are used, none carry any lawful implications except sexual intercourse. It may be viewed as a loophole, but once escorts steer clear of requesting that clients come have sex with them for cash, then in general, prostitution laws are a non-factor to their craft. This comes down to the phrasing of the laws in many cases. If we were to summarize the prostitution laws in most US states, they would tell us that having sex and being paid is not illegal. However, seeking random persons and asking if they would like to have sex for a fee is illegal. Based on what we know of escorts, they pretty much never engage in that kind of behavior and so they manage to stay on the right side of the law.
To tie this all together, escort services are usually legal simply because they are marketed as advertisements for paid companionship to which potential clients respond. What would be illegal is seeking out customers by offering sexual services in exchange for money.