I don't know but I suspect it's been a gradual thing. In the old days you didn't get any money, which meant only rich men with their own income could afford to enter parliament. Trade unions had to sponsor working men who stood for Labour. The system's just gradually grown up over the last century.
This basic problem is that when the recipients of expenses make up the rules themselves you are always going to get this sort of thing. How many of us do not claim all the expenses we are entitled to? Let he who is without sin etc etc. I'm not defending them for a minute it's just inevitable the way it is set up.