The 'coast' is a very natural part of getting to orbit. Burning close to the planet's surface saves the total amount you have to change your velocity by. The mechanics are a tad complex but the short version is you get more energy by changing your velocity when you are going faster. As you lose speed while you ascend, its best to do all of the burning you need to get out of the atmosphere as early as possible. This doesn't get you into orbit though as you will always need some burn above the atmosphere to reach an orbit. If you can get the burn done to get to your final height before you get there, you'll end up with a 'coast'.

The straight up to start with and pitching over are to do with balancing getting out of the thick part of the atmosphere as soon as possible and not having to thrust against gravity for longer than necessary (aero and gravity loses). The 'magical' part about straight up is not to do with orbital mechanics, but its often close enough to optimal.

Both of these are accurately-ish (enough to match these high-level outcomes) modeled by KSP and others.

Indeed some rockets do follow exactly that description. The reasons some real-world rockets don't is due to engineering limitations not modeled well in games. For example if you cant restart the engine you have to do it as one continuous burn. If you have too low a thrust to achieve the burn before you reach the place you'd have to do the second: again one long burn is the way to go.

KSP rockets restart without any penalty so that goes away, and designing a rocket that just has enough thrust to join circularising with ascent involves more maths than most players are willing to undertake. Most space programs don't have that problem...
 However KSP rockets are missing a lot of the limitations real world ones are subject to. Mostly cost and restart-ability and mass relative to the other parts