Why is a just-in -time compiler useful for executing Java programs?

I'm not sure if it's "useful" as much as it is the fact of it being how the Java compiler works.

However, there's a GCC frontend for compiling Java to native machine code rather than bytecode.