Yes, it's perfectly legal. Under certain circumstances (e.g. where transport byelaws apply), there may actually be an obligation to charge a fee.
When I ran a railway station, people would always moan about having to pay to get their property back. One guy in particular was really awkward about paying �20 to get his laptop back. He started ranting on about 'the law'. I politely asked him how much his laptop was worth. He informed me that it had cost him �800. I said, "OK, if you want me to follow the letter of the law, I'll happily charge you the appropriate fee, which is 10% of the value. That will be �80 please". Unsurprisingly, he decided to pay the �20 fee instead ;-)
Chris
(PS: The rail company had to employ a full-time member of staff solely to deal with lost property. It seems far better that the cost of her wages should be met by those people who leave things on trains, rather than added onto the cost of fares).