Two Reasons...
Gus appreciates quality.
Gus wants to cut out the cartel because of his history with them--they murdered his partner and love interest. To do so he builds his own lab. You will note that it is a very sophisticated lab and he recruits a PhD candidate in Chemistry to be his cook. As with Gus's restaurants, he realizes that quality of product is supremely important. It is good for business and he wants to provide it as a matter of principle. To this end, he gets a skilled cook and a state of the art facility. When the extremely pure blue meth appears, Gus wants to be the one providing it. His initial goal is to get Gayle up to speed in cooking that kind of meth. When Gayle dies, he is forced to settle for Walt and Jesse as his cooks.
Gus wants to deny it to the competition.
If Gus doesn't buy the blue meth, some other dealer who wants to muscle in on Gus's territory will. Worse, one of Gus's own dealers might buy it on his own and sell it at the expense of Gus's product. By buying it and distributing it to his dealer network himself, Gus maintains control of the market and freezes out competitors and potential competitors. Of course killing Walt would be another way to deny it to them, but as established above, Gus wants to get the scretsecret to doing it himself, first.