its an dirivtive from
the early bird gets the worm
hence when trials start early for more serious offences
you have to get up with the larks or before the beak
... at the bottom. There's also the fact that judges visiting prisons in the time of the Plague might wear a supposedly protective mask that looked like a beak.