The Gemara presents two parallel cases –
- Ulla quotes Rabbi Yohanan as teaching: If someone accidentally commits a sin and sets aside an animal as a sin-offering, but before he brings it he becomes an apostate, the sacrifice cannot be brought even after he repents. Since there was a time that the sacrifice could not have been brought, it is disqualified.
- Rabbi Yirmiya quotes Rabbi Abahu who says in the name of Rabbi Yohanan: If someone accidentally eats helev(=non-kosher fats) and sets aside an animal as a sin-offering, but before he brings it he loses his mind, the sacrifice cannot be brought even after he recovers. Again, since there was a time that the sacrifice could not have been brought, it is disqualified.
The Gemara explains that despite the similarities between them, Rabbi Yohanan needed to teach both of these laws. Had he only taught the first case we would have thought that the sacrifice could not be brought because the person disqualified it of his own volition, but perhaps the person who became insane should be treated like someone who was asleep. And had he only taught the second case we would have thought that the sacrifice could not be brought because his condition was beyond his control, but perhaps a situation where the person could always repent would be different.
The Gemara in Arakhin (21a) explains that the owner of every sacrifice that is brought must be aware and willing to make that sacrifice. Thus, someone who is not in control of his faculties cannot bring a korban. With regard to the apostate, the Gemara in Hullin (5a) argues that it would be considered the sacrifice of an evil-doer, which is considered abhorrent before God (see Mishle 21:27). The Gemara there discusses at some length whether this relates only to someone who transgresses one of the major sins (like idol worship, or desecration of the Sabbath), concluding that someone who is reputed to reject a single law will be allowed to bring sacrifices on all other transgressions, excluding the one that he is known to deny.