Because they weren't private messages. Private messages are between two parties. Instead, these were messages
on a platform which is owned by Twitter between two users where these users have agreed to restrictions. You can read about those restrictions here:
https://twitter.com/en/tos
HN is no different. I know this because I've been dinged by dang.