Sheva - 34:12 And We gave to Solomon the wind, a month´s journey in the morning and a month´s journey in the evening, and We made a spring of oil gush forth for him. By the permission of your Lord, some of the jinn also worked under him. And whoever of them deviated from Our command, We made him taste a severe punishment.
Why did our Lord give the wind at the command of Prophet Solomon?
The Arabic Letter Sad/38:34 Thus did We test Solomon, and We added material wealth to his kingdom, but he turned wholly (to God).
The Arabic Letter Sad/38:35 "He said, "My Lord, forgive me. Give me a rule that no one can attain after me. You are the Bestower."
The Arabic Letter Sad/38:36 So We gave him the wind at his command, which moved at his command, and he sent down rain wherever he wished.

The Prophets/21:81 And We gave Solomon the command of the gale that blows towards the land which We have made fertile, and We know all things well.