The numbers aren't random, though at first glance the rationale may not be obvious.
5700 kilograms is (roughly) 12,500 pounds - This aligns with the FAA definition of a "large aircraft" (an aircraft with a maximum certificated takeoff weight of more than 12,500 pounds).
Large aircraft tend to be "working airplanes" in passenger or cargo service, and will be operating to/from busy terminals. They will therefore benefit substantially from TCAS, and the operators can theoretically afford to equip their fleets.
Carrying more than 19 passengers further includes aircraft which may not be "large aircraft" but might be used as "working airplanes" in regular airline/commuter service carrying passengers (and would therefore benefit from TCAS, and theoretically be producing revenue to offset the cost of equipping them).
This roughly aligns with FAR 121.391 flight attendant requirements (Even relatively small aircraft - maximum payload of 7,500 pounds or less - are required to have a flight attendant on board to assist in evacuation in the event of an emergency, so it logically follows that such aircraft should be equipped with TCAS to avoid at least one possible type of emergency (mid-air collision).
As Federico pointed out, this is largely a cost/benefit trade off (nobody would argue for a flight attendant on a Cessna 150, similarly the TCAS safety features would be overkill for most Cessna 150s in the world).