Six months for being a John

I’m puzzled by this account of the sentencing of a man for having dealings with a woman he thought was a prostitute but was really a policewoman. Among the odd aspects is that he thought she was 16, but 16 is the age of consent in Canada. And then there’s the stuff about not wanting a criminal record. But isn’t the whole story a tale of police entrapment?