When you are doing a workout, your muscles consume a lot of energy to keep contracting & relaxing. The carbs, protein & fat you got from the protein bar you just ate is not going to be used instantly by your working muscle fibres. Through long & complex processes, the energy from the good you consume & your body's existing glycogen & fat stores are processed into substrates that help generate energy for cellular processes: ATP. It is ATP that provides energy for our bodily processes right from cell development to muscle contractions & growth.