One of the few international trains I've had an excuse to be on yet was the Øresundståg between Copenhagen (airport) and Malmö
There were interesting problems caused by Sweden reintroducing border controls in early 2016, as the private staff hired to control access to the platforms at Kastrup Airport were refusing people entry with EU ID cards. Nordic citizens didn't need to carry ID, and the private staff were demanding passports for travel, even though EU ID cards were and are perfectly acceptable in Sweden for intra-EU travel.
Travelling from the SNCF platform to the SBB station, it only ever seems to be people of colour they stop.
A friend witnessed an interesting situation there pre-Schengen. A black passenger had somehow entered Switzerland without going through the official border control (I believe that at least one platform had nothing more than a flimsy car-park style barrier separating the SNCF and SBB parts of the station). He then waited calmly for a train in the SBB part of the station, when suddenly several policemen out of nowhere appeared and detained him for illegally crossing the border. They had guns pulled, he was handcuffed and dragged off, all without even a quiet word said.
Quite overkill, given that the barrier at the time was quite easily avoided.
Having said that, the Swiss are ruthless in terms of customs to all passengers regardless of skin colour. There are a lot of complaints online of passengers using the Basel and Geneva stations and crossing through the customs line without making a declaration, only to be stung as they're carrying more than the duty free limits. I know one professional photographer who was stung this way, as he had (correctly) declared the goods at the Swiss postbox, but it turned out that he was supposed to go to a manned crossing and pay an import deposit for the lenses. The camera itself was duty free, but they deemed his additional lenses as being liable for import duties.
You were lucky. I've used that bus many times and indeed sometimes passengers are checked. People without a form of ID are normally not allowed into Germany. Although it did happen once that one passenger without ID had to leave the bus although another one, also without ID, could continue. They seem to be more tolerant for some than for others.
Yes, it's happened to me before that they wouldn't let me in with my old Polish permanent residence card. I'd forgotten my passport, but I saw the German Federal Police at the border crossing. I asked them if they'd let me in for half an hour to go shopping, and the answer was a firm "no".