Why is that a mistake?
It's hard to get proper transfer fees these days as everything is "undisclosed" but it's fair to assume they paid less than 100k and sold him for anything between 3.5 and 6 million. That's exactly what their business model is - buy undervalued players and sell as soon as they're overvalued. They've made some ridiculous profits on players in recent years, even if it's been detrimental to the team (because they can, in theory, replace with another cheap player with potential, who will also be sold when they become overvalued).
I can't think of any other club that is doing a better job in this sphere than Brentford and it's down to Benham's belief in, and talent for stats, as well as a degree of bravery in playing moneyball when everyone else would laugh at the idea.