A function/procedure that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor it into smaller functions/procedures which focus on well defined tasks. Those smaller function/procedure will not only be easier to understand but also probably easier to test.