The singular Lord acts in plural ways
God is one, but He exists eternally and expands Himself in innumerable forms and acts in various ways. Sometimes the common man is bewildered by all this and considers such activities contradictory, but they are not contradictory. There is a great plan behind all the Lord’s activities.
For our understanding it is sometimes said that the Lord is situated in the heart of the thief as well as in the heart of the householder, but the Supersoul in the heart of the thief dictates, “Go and steal things from that particular house,” and at the same time the Lord tells the householder, “Now be careful of thieves and burglars.” These instructions to different persons appear contradictory, yet we should know that the Supersoul, the Supreme Personality of Godhead, has some plan, and we should not consider such activities contradictory. The best course is to surrender unto the Supreme Personality of Godhead wholeheartedly, and, being protected by Him, remain peaceful.
Srimad Bhagavatam 4.17.36 purport