It's not always opt-in or part of Global Entry, for a number of flights that I've been on there is a facial scanner check in lieu of a boarding pass check, despite being issued a boarding pass, to board the plane for all passengers.
I cannot recall if this was only for international flights. Also, I believe I've seen this in Mexico, again, outside of Global Entry.