A pedestrian could have been crossing the road and may well not have looked to the left - and a cyclist coming up the inside could easily have hit them
It's highly unlikely a cyclist would hit a pedestrian in those circumstances. They're likely to be able to see them in advance, and when you're cycling in a narrow gap like that you don't get any speed up.
Highway code - look out for doors being opened and pedestrians
Well, obviously. But you can't do much about looking out for it if the door is opened just as you reach the car, can you?
If a pedestrian had been hit, the cyclist would have been blamed - they were undertaking.
No, they wouldn't. As stated upthread, the cyclist would only be blamed if the undertaking caused the accident. If a pedestrian steps into the road and is hit because they didn't bother to look - which is realistically the only way they are likely to be hit - they would be to blame.
It's not a perfect world - and especially if you are in the back seat, it might be hard to see if anyone is coming on the inside.
All the more reason to be careful. As a driver, if I am letting someone out of the back seat in circumstances like this, I get them to wait while I check my mirrors to see that it's safe.