Pine trees grow best in acid soil. However, they can be made to grow in sweet soil, and they are often planted in windbreaks along fields, and in lawns and parks. They are adaptable to some degree. As the tree develops it begins to a create its own environment. Maturing needles drop to the ground, where their slow decay adds acid to the soil. Soon grass beneath them dies and shrubs become stunted.
The writer of Proverbs knew that persons, like trees, need a favorable environment in order to thrive. If one wishes to be wise, associate with wise people. To associate with fools can result in foolishness (Prov. 13:20).