The surrounding conditions a thing exists within. What is not the thing, but decides what the thing can do.
Old French environner (to encircle), en- plus viron (a circuit), from virer (to turn).
Its root is a turning-around: to environ was to encircle something completely, not merely to sit beside it. An environment surrounds on every side, which is exactly why it can decide what the thing inside it is able to do.