Hazrat Qari Siddeeq Ahmad Baandwi (rahmatullahi ‘alaih) mentioned:
Ikhlaas (sincerity) cannot be created by itself and if, perchance it is created, it will not remain unless one keeps the company of those who have ikhlaas. Not keeping the company of those who work with ikhlaas, makes it impossible to attain ikhlaas and even if perchance one did attain it, then it would not remain with him.
If you really want to become sincere and save yourselves from destruction, then establish a ta’alluq (connection) with Allah Ta‘ala’s pious and righteous servants. Through their barakah, ikhlaas will be created in you. (Hayaat-e-Siddeeq, pg. 399)