The etymology follows the drive-in which is basically a big parking lot you drive in to, do your ordering/eating/movie watching in your car, and then you drive out. And when you don't stop in the middle of a drive in, but instead you continue through it, in your car, it became a drive through.