You always collect luggage at you point of entry into the USA. Since SJU is already in the USA it'll check through to CDG going that direction. Coming from CDG to SJU you would collect it in EWR and then be expected to re-check it after clearing customs, which you could just skip if you also are planning on skipping the flight.
It is a CBP policy, not a TSA one.
Are you really going to buy a ticket SJU-CDG just to get from SJU to EWR, or am I misunderstanding your post completely?