I’ve actually thought WAY too much about this. I’ve come up with several explanations:
The drive through is by necessity a sequential operation. Barring the “please pull ahead and wait in the spot” option, drive up customer N can’t be served until customer N-1, N-2, etc. have all been served. This means that if the drive through gets backed up just a little, all it takes is one difficult order to really screw things up.
Walk-in customers can, to a certain extent, be waited on in parallel. The occasional difficult order doesn’t slow the service to to folks behind.
When walk-in customers see a long line, they have already invested time to park and walk in. When drive through customers see a long line, they are already in their car with the engine running and ready to take them down the street to the other McFood establishment.
When the drive through line gets messed up, it is much harder to fix than when the walk-up counter has problems. Thus all the new employees have to learn at the walk-up counter and gain experience before working the drive-through.