When they are beamed out of the hospital elevator....
...the sequence of events makes no sense.
First, they re-materialize just outside the ship. Why not re-materialize INSIDE the ship?? You see the ramp opening for them to walk up almost as soon as they beam there. Only thing that makes sense (although not much) is that they materialized there in order to not beam the doctor on board, seeing as she wasn't supposed to go with them (although they could have easily beamed her anywhere on Earth once aboard).
Then, after everyone walks inside except for Kirk, he tells Scotty to beam him up? Why? Just to be a big shot? Why didn't he just walk in like everyone else just did? In fact, Kirk makes weird and cavalier decisions the whole movie, but this always irked me.
Has anyone else ever thought about this?