It's possible malware somehow found its way to the phone, but the more likely scenario is that the phone was infected out of the factory.
The bottom of the barrel Android phones (no name brands, often phones <$200) feature system level adware that downloads and installs more crap as time goes on. It's one of the reasons these phones can be sold for that cheap.
I have to wonder what brand phone you got him. I've never seen this happen on brand phones, it's always the AliExpress/Amazon crap that's full of ads in seconds. Spend the same amount of money you'd spend on an iPhone SE and I highly doubt you'll get the same result.