Why do ostriches have wings?
There is a common misconception that a selective process is needed to remove a feature from a population. However, the correct approach is quite the opposite: selective processes normally maintain a feature in a population: if a given feature stops promoting selective advantage, its corresponding genes start to "erode" and the feature disappears from the population (and that can happen in different rates, depending on several factors: have in mind that maladaptative features do exist).

That being said, the maintenance of wings in ostriches indicates us that there must be a reason for it. 

It has been hypothesised that wings:


Improve balance when running;
Helps regulating temperature;
Serve as mating display.


(source: University of Washington)