So yeah, a certain proportion of those who operate cash-only businesses - gardeners, builders, whatever - fraudulently under-report their earnings. A proportion of those will also fraudulently claim benefits, though less than you might think - if you're going to do benefit fraud it makes more sense to do it on a larger scale, you're risking the same penalties and getting more income. But in any case, it's misleading to talk as though this were in any way specific to prostitution.
If you operate a cash only business with no paperwork there will always be a temptation to under report earnings.