This route has to make what is called a "tech stop" in SJU. The plane can't take off in STT with a full passenger load AND a full fuel tank, so it stops in SJU to refuel. It's not the distance, it's the FAA takeoff procedure in STT - it has a certain climb rate requirement that couldn't be done with that much weight.
No one gets on or off - the plane literally just lands, refuels, and gets back on the road from SJU to EWR.
In my experience, the refuel is very speedy. But no, you cannot book just the STT to SJU leg or the SJU to EWR leg.