The app payments go through the iOS mandated payment system. There are parental controls you can enable on a child’s device to restrict what can and cannot be purchased, notify the parent, etc. The kid just went around that and disabled those controls and/or figure out the parents unlock password.
This is part of why Roblox, Microsoft, and Epic pay Apple 30% of platform transactions to handle things like this.