My experience with BMWs is that they
do tend to have ridiculous flaws, like the main bearing problems in the E90 M3s and the V10 M5s, or the fuel pump issues on the E90s in general. But BMW will set them right.
The reality is BMWs just have a lot of stuff on them and so it is a numbers game. Things are going to break. Cars are a hostile environment. This is compounded by the fact that it is a BMW. I expect everything to work. If it was a used Corolla I may not complain as much about the seat mechanism not working perfectly every time.
Additionally BMW also expects the car to work perfectly and the car is eager to tell you any time something is abnormal. This creates something of an illusion of unreliability. An old Toyota also has a lot of problems, you just don't notice until you go looking.
And finally, dealers are predatory. They take advantage of the reputation of BMWs as expensive unreliable cars and sell unnecessary services, which perpetuates the expensive/unreliable reputation.