They do it because they can.
The £50 charge came in not long after 9/11, when pilots were being laid off and people would have sold their granny for a job offer. It has been with us ever since, because for every person who sees it for the exploitative money-grabbing scheme that it is, there are plenty more who are desperate / daft / naive enough to stump up the cash. If pigs learned to fly and everyone refused to pay, the charge would disappear overnight.
I would never ever work for a company that charged me to apply for a job, but there are clearly enough people out there who are prepared to.