Believe it or not the majority of drivers don't set out to do this kind of thing. Obviously there's no excuse however, if you're a car driver who drives a regular commute, you're likely to have experienced the situation where you get to one end of the journey and cant actually remember most of it. This is a standard human response because the brain basically operates in auto pilot mode; it's done this before; if it does this then this happens and the end result is this. It's basically how we learn and get better because the brain dosent have to work as much on stuff it already knows.
Transpose that to driving a bus and you have a situation where you're constantly having to correct parts of that, especially if you're in the position of swapping between single and double deckers. It's very easy to say 'there's a warning sign' however if you're driving a double deck bus it actually looks identical to a single deck bus except for a small sign which is likely to look much like any other small sign, you'll have perception of hazards left and right because you can see them however it's impossible for the brain to perceive the hazard about it because it cant see it.
Again, there is no excuse for it, however it's worth remembering that there's a human being involved and they're fairly aware that a momentary error can maim or kill somebody (compared with the other examples where a lorry driver might smash up a few pallets of fizzy drink or somebody may be unable to get out of the door they wanted to use).
That’s very similar to the situation of driving a train where the cab of a 4 car looks identical to the cab of an 8 car.
As you rightly say, repetitive behaviour is prone to human error and mistakes need to be guarded against. This is where “non technical skills“ come in - displaying a formation reminder, marking train length on the diagram etc.
In a bus driving context, perhaps drivers could put a large sheet of paper onto the dashboard to remind them they’re driving a double decker.
As professional drivers, it’s down to the individual to be aware of the risks, and to do whatever works for them to ensure these mistakes don’t happen.