I can't speak about SJU specifically, but every time we have transited through the US, we have had to claim our luggage and clear US customs, even when continuing on to Canada. I suspect the issue is that one could potentially leave the airport and stay in the US. The only exception I have heard to that was a friend who transited through an airport that had a separate secure area in the airport - a holding room - where they were allowed to stay. They had the option of clearing customs or going to the holding room.