Back in the early days of CA Top Secret, PGM= was used to assign a FACILITY to an address space.
Any address space that started with that PGM= would pick up the associate FACILITY.
With the advent of the MASTFAC keyword, now you assign the FACILITY to the address space by putting MASTFAC on the acid that brings up the region.
MASTFAC overrides the PGM=. Most site have migrated to MASTFAC, but havent removed the PGM= in their FACILITY definitions which is fine since MASTFAC overrides it anyway.
If you had multiple PGM= in you FACILITY definitions for the same program, the last PGM= would be used.