How are the TRACON location IDs determined?
An "up/down" facility is where the tower and TRACON are in the same building and most of the traffic is to/from that airport (typically one class C or TRSA), so they share the identifier. They do provide services for satellite (class D or untowered) airports, but their traffic levels are usually negligible.

A "standalone" facility is where the TRACON is separate building, often on the grounds of a large airport but not the same building, and serves multiple airports (typically one or more class Bs plus any underlying class Cs, plus any satellites) so it gets a distinct identifier with numbers, which can't be confused with an up/down. I've never found a source for where the specific numbers come from; they don't seem random, but there isn't any obvious pattern either.

Recently, the FAA has created "consolidated" TRACONs that merge several neighboring standalone facilities. I'm not sure why the FAA has assigned them all-letter identifiers (e.g. PCT for Potomac Consolidated TRACON), but perhaps it's because there are so few of them (so far) and they cover such large areas that they're relatively well known and there isn't much risk of confusion.