I'll tell you how. You accidentally left a chest open. A troll came and buried your pies in the chest. Unfortunately, you thought the pies were weapons, so you put them in your weapons chest. In that chest was also gunpowder. The troll buried the gunpowder, too. When you returned and started a campfire your base exploded and your pies came out of the ground, catapulting you into the atmosphere. Being a Moonman, you can breath without oxygen. After spending a couple of hours trying to find an orbiting rock or pie, you saw a bright light in the distance. Grabbing a pie that got gunpowder in it, you used a torch to set up a flare. One quick throw, and the light started coming towards you. The spacecraft picked you up, and there you are.