TV production companies seem to think that an ability to produce reasonable stand-up comedy automatically equates to an ability to act. (It doesn't, as Lee Mack, Johnny Vegas and several other comedians have repeatedly proved). They also seem to think that someone who writes comedy has an automatic right to appear in it, rather than getting professional actors to take on the roles.
The very best of British TV comedy (such as Steptoe and Son) has nearly always come from full-time writers (with little or no desire to act themselves, such as Ray Galton and Alan Simpson), working alongside professional actors (such as Wilfrid Brambell and Harry H Corbett). Occasionally, particularly on radio, there will be people who're superb writers and who've also got the talent to act in their own series (such as Andy Hamilton and John Finnemore) but they're definitely the exception, rather than the rule.
Lee Mack's stand-up style doesn't translate well to sitcom, either in his writing or in his acting.