Assalaamu alaykum. Could you please tell me why there are Muslims who act religiously and then change? For example, a person was guided by Allah, and Allaah did everything for them. That person seemed like a religious person, which is what they were showing. However, it came to the point where the person's character had changed, and they then wronged another believer and went against Allaah.
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
This worldly life is a place of trials and temptations; Allah says (what means): {[He] Who created death and life to test you [as to] which of you is best in deed - and He is the Exalted in Might, the Forgiving.} [Quran 67:2]
The human being has many enemies, such as his desires, the love of this world, and the devil, in this worldly life. The worst of them is the devil, who is the enemy of mankind. The devil plots against the person and tries to mislead him, he beautifies his evil deeds for him and is very keen to misguide him and mislead him; Allah says (what means): {[Satan] said: Because You have put me in error, I will surely sit in wait for them on Your straight path. Then I will come to them from before them and from behind them and on their right and on their left, and You will not find most of them grateful [to You].} [Quran 7:16-17]
Also, the heart itself fluctuates; a person may sometimes be very active in performing acts of worship and acts of obedience to Allah, and he may become lazy at some other times. It is for this reason that the Prophet said, “Verily for every deed (act of worship) there is a period of eagerness (shirrah), and for every eagerness there is a period of inactivity (fatrah). So, whoever applies his period of inactivity in accordance with my sunnah (religious practice), then he is guided. And whoever applies his inactivity in accordance with anything other than that, he is destroyed." [Ibn Khuzaymah, Ibn Hibbaan, and others, and it is a saheeh (sound) hadeeth]
Hence, it is not surprising that a person becomes lazy and goes astray after having been on guidance and on a straight path.
In any case, it is very important to consider the lesson that is concluded from this case, which is that a Muslim should be keen on what helps him to remain steadfast on the right path, such as seeking beneficial knowledge, performing good deeds, keeping company with righteous people, and avoiding the company of evil people. He should also be honest with his Lord, because if a person is honest and sincere with his Lord, then Allah will help him and make him firm on the religion.
Ibn Katheer when interpreting the verse in which Allah says (what means): {O you who have believed, fear Allah as He should be feared and do not die except as Muslims [in submission to Him].} [Quran 3:102], said, "It means: preserve your Islam while you are well and safe, so that you die as a Muslim. The Most Generous, Allah, has made it His decision that whatever state one lives in, that is what he dies upon and is resurrected upon.”
Allah knows best.
You can search for fatwa through many choices