I think that websites generally do this based on whether the content is primarily intended for children (e.g. youtube doesn't collect this type of data when users are viewing videos marked as being for children).
I have a YouTube playlist of videos I'd like to show my kids. It turns out that YouTube will not allow videos marked as "intended for children" to be added to a playlist, even by an account that belongs to a adult. So the only videos I can put in that playlist for my kids are ones YouTube thinks are NOT for kids.