We think it came from the rapid formation of the planet out of the solar nebula. The faster matter is assembled, the more rapidly it has to shed its potential energy for kinetic energy and if the volume of the body grows too rapidly, much of this energy of formation is trapped inside the planet. The core temperature is about 50,000 K or slightly more as I recall. Compare this with Earth at about 5,000 K or the Sun at 10 million K! We think that the core of Jupiter is a stable solid form that is not contracting, so Jupiter is in hydrostatic equilibrium where gravity is balanced by simply the strength of the core material.