They're not supposed to but they do it anyway. I used to be a CAB adviser and actually phoned a particular bank about it, quoted the legislation and the guy I spoke said something along the lines of not knowing where particular deposits have come from/what they are etc. Which of course makes no sense given that they produce statements that clearly set out what each transaction is.
Of course for Housing Benefit one way around it is to request that it is paid directly to the landlord (unless you have a reason not to like the landlord is not getting repairs done etc. or a similar dispute). The regulations regarding direct payment were relaxed (again) last April, but you would still have to make a written request to the local authority.