The media plays a role, but it largely reflects the viewpoint of society. We live in a society that stigmatizes prostitution and especially prostitutes. This stigma helps maintain a check on the size of the prostitution sector, and it deters some women from entering the industry and some men from participating. Women on the whole are bigger opponents of prostitution, broadly speaking, than men. Married women see prostitutes as competition, both because the availability of prostitutes somewhat reduces men’s interest in marriage and because, once married, the availability of prostitutes reduces women’s bargaining power within marriage. Many laws and social stigmas seem designed to keep men from straying, and to the extent these social controls are successful they increase a woman’s bargaining power within marriage, as the wife becomes closer to a monopoly provider of (non-solo) sexual release. Stigmatizing prostitutes and loose women, and men who are ‘cheaters,’ helps maintain the bargaining power of married women.
Religion helps, as many religions from Christianity to Islam make prostitution a sin. Perhaps these social controls including religion arise from society’s desire to procreate and a need/desire to have men serve a nurturing role as providers for their children and not just sperm donors. Maybe a social need to keep men ‘at home’ and tied to wife and children is be a deeper cause of the stigmatization of non-marital sex in general and prostitution more specifically. Of course, social rules and religions are not absolute, and neither is behavior. Men who “cannot help themselves” are stigmatized but otherwise allowed to participate in society. Women who are sluts or, worse, prostitutes, are even more heavily stigmatized but put up with, as long as they know their place at the bottom of the social order. But I am not sure of this, as non-monogamous models of marriage seem viable as a method of keeping fathers in a provider role.
Even where prostitution is legal, at least in Europe, those working as prostitutes face stigmatization. Despite legalization, society still imposes this sanction on the prostitute, and to a lesser extent, on clients.
So no, I don’t think the media deserves too much blame. I blame society itself.