Customs do happen like that routinely on intra-Schengen trains. But intra-Schengen, there's no immigration to clear. In Eurostar terminals at Paris Nord, London St Pancras, Lille Europe and Brussels Zuid there are immigration checkpoints. The ones on the continent are manned by UK border agents, the one in London, by the French border patrol. This way, Eurostar trains are effectively intra-Schengen. Since you clear immigration at a checkpoint, they don't usually have roving customs officers on the trains.