A. If you're charged, you're probably at a great disadvantage.

B. When men die in your unit, the amount of men firing on the enemy will go down quickly if in one long line. If you have two units firing on the enemy instead, with 2+ ranks, the dead will be replaced and you can keep firing at the same rate for longer. There's only a certain length of line that can fire on the enemy regiment so a long line of a single rank is at least not always better.

The kneeling etc is a technological advance.