“It is necessary to adopt good company and also to remain in a good environment. Adopting one without the other is not sufficient.
A person could be sitting in the masjid (a good environment), but due to sitting with the wrong people still engage in sin.
Similarly, a person may be in good company but due to being in a bad environment still become involved in sin.
It is thus evident that we need both, the adoption of good company and good environment.”