This is slightly interesting topic, as while Lances don't intentionally fire through friendly units, it does often happen because of their long beam time.
Now, friendly fire is part of Zero-K. At least when it comes to AoE damage like Fire Walker, Ogre and Tremor to name a few. This is however tied to the way AoE damage behaves, especially with non-instant projectile speed. Lance friendly fire is still completely manageable with proper unit management, especially when you don't tend to have too many lances on the battlefield at once.
However, if we changed Lances not to do friendly fire. We would face a new problem. Currently whenever Lance hits a friendly unit with its beam, you are essentially punished twice:
1.Your own unit gets damaged or even dies
2.Enemy takes reduced damage
So lets assume Lance did no friendly damage. Now you would not take any friendly damage from Lance shots, but you also would cause significantly less damage to the enemy as even single friendly glaive would be able to tank the entire Lance shot, thus shielding the enemy.
So Lances not doing friendly damage would just create a new, although different problem to solve. As such, it is better to keep it as is for consistency with overall friendly damage mechanics.