You start by defining work as the integral of force over some path:
##W=\int_C Fds##
You get a quantity W out of it - it tells you something about how a force acts on an object. You wonder if it's ever going to be useful to you.
When you calculate this quantity to be non-zero for some system, you also make an observation that some other properties of the analysed system changed at the same time. Be it temperature distribution in the system, position of masses in a force field, velocity of those masses, etc.
You try and quantify by how much these properties change when you do work, and you end up with equations for heat transfer, potential energy, kinetic energy etc.
Since you observe that at least one of these properties changes by the exactly right amount to compensate for the work quantity, you conclude that work cannot be done without expanding those (and vice versa).
You call these properties energy for the lack of a better word. You end up happy you've managed to find a way to connect various properties of a system though the single quantity of work.