David sort of had this 'A-ha' moment about how to both free Kal up to pursue other things and, most importantly, service where David wants to go at the end of the season with House's story.
"House" executive producer Katie Jacobs • On the way that she and executive producer David Shore let Kal Penn leave the show. It involves a plot twist, and yes, the link spoils it. source