It doesn't require the same level of commitment from them - giving people money to become citizens would likely result in a lot of new German citizens that live outside Germany and have your money. If you want to require them to stay in Germany, now you have to set up a new area of regulations and enforcement and so on and people will be less interested because you are 'trapping' them. If you give them an education instead, you are de facto requiring them to commit several years to living in Germany, and hopefully building ties to the country that make them want to stay after they get the free education - and you didn't have to set up any kind of new rules to handle them.
Or even just drastically lower visa requirements. But, you have to do what's politically feasible. Students are amongst the most accepted foreigners in German society.