What is the wisdom behind the legislation of fasting?
Fasting is a divine school from which the believer learns much and trains in virtues that may be needed in life. Among these virtues is patience, as it is the month of patience. Fasting also teaches honesty and consciousness of Allah in both private and public, for there is no observer over the fasting person in abstaining from lawful pleasures except Allah alone.
Fasting strengthens willpower, sharpens determination, and nurtures mercy and compassion among the servants of Allah. It is a struggle against the self, a restraint of desires, a purification of the soul, and a cultivation of goodness.
The Prophetﷺ said: "Allah, the Almighty, said: ‘Every deed of the son of Adam is for him, except for fasting; it is for Me, and I shall reward for it. Fasting is a shield. So when one of you is fasting on a day, let him not engage in obscene speech or raise his voice in anger. If someone insults him or fights him, let him say: I am a fasting person. By Him in whose hand is the soul of Muhammad, the breath of the fasting person is more pleasant to Allah than the fragrance of musk.’" [Bukhari and Muslim]
What should a person who doubted having missed a pillar of prayer do?
All praise be to Allah, The Lord of The Worlds. The prayer of one who doubts having missed one of its pillars is valid, and nothing is due on him/her since having a doubt after offering the act of worship doesn`t undermine its validity. And Allah Knows Best.
What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
Is it permissible to participate in an Udhiyah?
Praise be to Allah, and peace and blessings be upon our master, the Messenger of Allah.
Regarding the sacrificial offering (Udhiyah), if it is a sheep or a goat, it only avails for one person. However, if it is a cow or a camel, it avails for seven people. It is permissible for the seven participants to have different intentions; for example, some may intend the sacrifice (Udhiyah), some the ’Aqiqah (sacrifice for a newborn), and others may simply intend to obtain meat.
It is stated in Hashiyat Qalyubi ‘ala Sharh al-Mahalli (Vol.4/P.256) and in Bushra al-Karim (p. 706):
"If one slaughters a camel or a cow on behalf of seven... it is permissible. Likewise, it is permissible if some of them intend their seventh for meat, and others intend their seventh for ’Aqiqah." And Allah the Almighty knows best.