Not sure there's a "science" behind this.
There's mathematics, sure.
We know the exact mathematical operations performed to train the LLMs and to make use of the LLMs (perform inferences).
But I hesitate to say there is "science" behind it because the mathematical operations performed do not attempt to simulate or approximate any physical system.
It's like you execute a series of mathematical operations and plot the output of each step onto a canvas using some coordinate system, then you step back and notice some "interesting patterns." Doesn't mean there is a "science" behind your series of mathematical operations, the output just happen to resemble something you deem interesting when mapped using a certain coordinate system.