Actually, trams can be designed so that you have to file past the tram driver when boarding. In Amsterdam, on most trams you are only allowed to enter at the doors by the driver or the conductor, with the other doors being exit only. In many places, even though they have open boarding, tram drivers sell tickets.
Open boarding is a necessary evil where the main priority is to get as many people on and off as quickly as possible. Checking whether everyone has paid is secondary and some lost revenue is inevitable, albeit mitigated by regular inspections. If there was absolutely no downside to front door only boarding, then open boarding wouldn't be considered. One compromise is to insist on front door entry late in the evening, which is common practice in Germany, for example.
The conductor on the original Routemaster did not collect all the fares when the bus was busy and there was not even potential for penalty fares, because the assumption was if you didn't have a ticket, then the conductor hadn't seen you yet.
--- old post above --- --- new post below ---
Because checking tickets at ticket gates doesn't slow down the train.