How can you avoid developing bunions?

Better foot function. You can't really avoid getting bunions, but you can slow down the progression of the deformity with good shoes and supports. Improving foot function will slow down the wear and tear.
See below. . Proper fitting shoes that provide good support. Orthotics are often helpful in preventing bunions and many other deformities.
Avoid tight shoes. Narrow toe boxes in womans shoes are a big concern. Support feet that flatten with an orthotic - this will help stabilize musculature.
They're mostly. Hereditary, so look to your parents and grandparents. Wearing comfortable shoes that fit properly can make the most of your comfort level.
Options. A bunion is a progressive disorder which usually has a genetic component. Bunions may also result from trauma or due to a biomechanical abnormality. Prevention options include the use of bunion toe spacers, strapping, orthoces, and use of more comfortable shoes.
Can't . You can ease the progression by wearing proper fitting shoes that don't push on the toes. You can try a bunion splint.