I've only seen it when they thought I might be too young. That hasn't happened in a while
I've seen one other airline (UA) do it for a premium (Polaris) lounge, likely to ensure people aren't just scanning in with someone else's boarding pass. But even that hasn't been consistent.
I've never had AC do it for any reason other than age verification.