kkozoriz1
Fleet Captain
But that still doesn't say why Scotty abandoned his post and transported to the Enterprise with Kirk. It's not like Kirk needed him to come along. He'd only just met Scott. It was written that way because Scotty had to get on the ship for the crew to be complete, not for any logical reason.