I thought it was just because I’ve flown on them before and they “know” me.
It is not random at all for those who get pre-check with not signing up for it. If you have a history of flying, older age, a child, and others....... you might be added to the pre-check line occasionally. Probably also has a lot to do with lower number of pre-check flyers for a given time of day when precheck lines are light.