I have no direct experience of Labour Party by-election protocols,
but I would suspect there are a couple of reasons for running a candidate;
a) There may be some dyed in the wool Socialists who will never switch allegiance,
b) To avoid giving the Tory press the opportunity to claim the Labour Party are 'no longer a National force',
c) A presence can be organised by the local Labour Party, without HQ being involved,
d) A candidate gets to experience the (heightened) atmosphere of a campaign, and their performance can be monitored,
e) force the incumbent party to defend their performance across the whole spectrum of local and National policies rather than just rubbishing the Progressive Alliance.
Others can, no doubt, add more.