Although we have learned that a sacrifice must be brought lishmah – with the proper intention – the first Mishna (2a) teaches that if a sacrifice were brought she-lo li-shmah – with the wrong intention in mind, e.g. the animal had been set aside for one type of sacrifice but was slaughtered for a different sacrifice – it remains a valid sacrifice, although it does not count and the owner will need to bring another sacrifice to fulfill his obligation.
Reish Lakish is disturbed by this ruling, and argues that if the korban can be brought, it should serve its purpose, and if it does not serve its purpose, then why should it be brought? That is to say, if the need for lishmah is only an ideal, but the sacrifice remain valid, then why would it not fulfill its purpose? And if it is essential to have the sacrifice brought lishmah, then a korban without proper intent should be disqualified entirely.
In response Rabbi Elazar points to a Mishna from Massekhet Kinim (2:5) – which deals with sacrifices brought from fowl – that teaches that if a woman who has given birth brings her ḥattat and then dies before bringing her olah, then her children will have to bring the olah on her behalf. If, however, she has brought her olah, the children will not bring her ḥattat – even if it was already set aside during her lifetime – since she is no longer alive to receive that atonement for which the sin-offering is brought. He argues that it is clear from here that the olah will be brought as a korban, even though its owner is not here to benefit its sacrifice.
Ultimately Reish Lakish agrees that sacrifices must be brought even if they will not serve their ultimate purpose, based on the passage in Sefer Devarim (23:24) that obligates a person to ensure that the vows he made to God are fulfilled.
A woman who has given birth is obligated to bring two sacrifices – an olah (a lamb as a burnt-offering) and a ḥattat (a pigeon or dove as a sin-offering) – see Sefer Vayikra (12:6-8).