>>13647156The very high vacuum of space can't suck our atmosphere for the same reason you can't use a straw to suck water up more than 10.3m.
At high altitude some of the small amount of free hydrogen in the atmosphere will raise high enough that when the energy of the sun hits them they accelerate, at a point you have enough gasses moving that they are no longer being bound by laws of fluid dynamics but are actually traveling in ballistic paths. Add a bit more energy from the sun and they can escape higher and then slowly build moment and speed until they break free of the gravity of the Earth. The vacuum of space doesn't pull or suck them up, it just doesn't have things to get in the way to slow those atoms down.