James Joule did some impressive research into energy and had the International System of Units unit named after him. Another James, James Watt, did a lot of research into power, which is the measurement of energy over a set period of time, which is where we get the watt. Joules and watts do not measure the same thing, as watts are joules/sec, which is why we have time constraints such as watt-hours, which then cancels out that time factor in the denominator and gives us a time agnostic measurement.
This difference between energy and power is important when looking at things like batteries and capacitors. Batteries have high energy densities but relatively low power densities while capacitors are inverted, they have high power density but low energy density. What that means is that batteries can put out a lot of energy over a long period of time whereas capacitors can put out a lot of energy very quickly. This is why batteries are used as the main power source for electric cars but capacitors are used to store and release energy for braking and accelerating, when demand and supply peak.