as confirmed by the article, this was based on a basic automated keyword-based search system.
If I understand this correctly it’s designed to match topics that can be potentially (focus on potentially) unsafe (think of a simple “dumb” list of “bad” words like sex orgy shit fuck gay lesbian… etc), and sends them off for a manual review.
A book with a gay protagonist is likely ok for children, but not if it contains realistic depictions of sexual activity etc.