Another way to say "eating an apple is for getting energy." is "you can get energy by eating an apple"