Zero matrices are the conventional outputs of multiplying empty matrices. The column-major Vector with length N is treated as a column vector corresponding to a Nx1 matrix. Multiplying a MxN matrix by a Nx1 matrix is expected to make a Mx1 matrix, and given matrix-vector multiplication, the output is the corresponding column vector with length M. Each element of the output is the dot product of a row and column, both of length N. In your case, N=0 and M=2, and the dot products of empty sequences are 0s. I don’t know of a practical use for empty matrices, but the math is consistent.
Generally, throwing an error for some inputs won’t affect type stability because if it doesn’t return, then it doesn’t contribute another return type. At an extreme, a method that is inferred to never return (e.g. throws error, exits) will have an inferred “return” type of the bottom/empty type Union{}, which has no values and subtypes every other type.