
It’s more of a trying to teach your body that it can go without, ie go without sweets, certain foods etc and show yourself that you’re capable of not giving to your cravings or just simply being able to say no sometimes. In learning this, you can also show yourself that you can say no to sin even if you crave it (like craving something that isn’t good for you like sweets) in doing so, it helps you grow closer to god by being able to say no to sin. Hope this helps!
I mean, there definitely is still the element of “I want to show god that I am capable of this” but it’s also about proving it to yourself. If the overall goal in life is to grow closer to god, then it makes sense that fasting might be used as a way to achieve that goal. In Christianity it isn’t about domination and complete devotion, but more about just trying your best and knowing that god loves you