If someone does by Mitasek [מתעסק] [fooling around] a type of sin that requires a sin offering, do they need to bring a sin offering? That is not the same thing as accident. For all sin offerings come only because of accident, never because of doing something on purpose. Accident here means doing one thing and something else results.
But Mitasek is different. To Tosphot he is not obligated to bring a sin offering except for when there is pleasure involved like sexual sin or eating forbidden fat. [That is all the fact that is on the stomach of the animal.] (The statement of Shmuel is המתעסק בחלבים ועריות חייב משום שנהנה)
Rav Shach brings down that the Rambam is a bit different. It could be he holds like Tosphot. And the reason that for Shabat he brings only the "Ptur" ["Ptur" means a reason not to be obligated in something] of מלאכת מחשבת ["thought out work"] is that receiving pleasure is possible also for a work on Shabat and so it is needed to have a special ptur even in such a case. Tosphot brings this idea in Sanhedrin page 62 which I was doing with my learning partner David Bronson. [That is why this subject came up in my little booklet Ideas is Shas. That was because David had some ideas here.]
But still it is curious that in laws of sin offerings nothing about gaining pleasure is mentioned. So it looks like the only ptur for shabat is thought out work.
So then what about laws of forbidden food 14: law 12? There the Rambam does say one who eats forbidden food by mitasek is obligated because he derived pleasure? Rav Shach answers that that place is talking not about a sin offering but rather an case of doing something on purpose and doing on purpose is possible even for mitasek since one can be mitasek "fooling around" on purpose and then the sin comes about because of the fooling around.
What comes out from all this is that is general mitasek to the Rambam is not a ptur for a sin offering except for Shabat when to be obligated one needs thought out work מלאכת מחשבת