You can’t buy it, but they can sell it
You probably didn’t know that sale of sex and prostitution in Canada is technically legal. In 2014 in Canada a prostitution bill, C-36, also known as the Protection of Community and Endangered Persons Act was signed.
According to this law sale of sex is legal, but things like “communicating for the sale of sexual services” and other aspects of this process, such as interactions between prostitutes, johns, and pimps, are still banned. (Source)
This follows so called “Nordic model”, first adopted by Sweden in 1999.