People get bunions partly because they had the wrong parents and partly becasue they wear the wrong shoes.
The causes of bunions in the feet are generally considered to be a hereditary predisposition combined with the wearing of shoes that are too tightly fitted.
There is not a lot you can do about your parents (the inherited predisposition), but there is a lot you can do about the fitting of your shoes.