All power supplies contain some internal resistance when current is flowing due to the thermal energy produced as charges move.
If a battery with no internal resistance was short circuited by a wire of zero resistance where would the energy go? Some questions can't be answered because the situation is impossible.
Key Concepts
Internal resistance
The inside of a battery has resistance. The electrical energy lost means that terminal potential difference is less than the EMF: \(V=\varepsilon-Ir\)
EMF and terminal potential difference
If no current flows, the terminal potential difference is equal to the EMF.