I'm sure Tom and others in the AD office and elsewhere at BYU influence where donors put money. Also, a key figure in all this is Ryan S. He seems to have more interest in basketball than football, so his influence probably pushes some donations (money directly from him and money from people he influences).
Overall, I would personally prefer most money go to football, because that is the sport I pay the most attention to. Also true of most BYU fans. However, getting the top recruit in the country, one of the highest rated recruits in years may be program changing. Moving basketball towards the blue blood discussion and getting all the press that comes with AJ will hopefully be good for BYU as a whole, the church, athletics, etc. Not the same, but potentially similar to Prime and Colorado. Prime was really expensive to hire, but Prime has brought far more money to Colorado than the cost to bring him. I hope AJ has a similar impact on BYU, recruiting, money coming to the program, etc,
Also, I think there is money from donors that are mostly interested in basketball. Thus, this money donated to basketball doesn't really impact football money. No idea how much of the $5 million is money that MIGHT have gone to football. Either way, I am hopeful that the increased press, money, etc. actually helps football.