The description is a bit off. Spensa was raised in caverns on an alien world and m-bot is (mild spoilers for skyward ahead) a ship's ai on a starfighter that crashed long ago on that world. He is hesitant to leave is position and fly/fight due to his previous owners last orders.
It's a great book and myself and my kids really enjoyed it, but I don't think it's the book OP is looking for.
Unless you're a farmer/rancher. Then it's a way of life.