Here is what happens: a becomes matrix
0 1 2 3
4 5 6 7
8 9 10 11
as you just described.
$ has dyadic rank of 1 _, which means it applies rows of left argument to the entire right argument and pastes result together.
a $ i.5
is (0 1 2 3 $ i.5),(4 5 6 7 $ i.5),:(8 9 10 11 $ i.5)
All the subarrays have different shape, so they are coerced into least common shape that would fit them all, which in this case is 8 9 10 11
. Therefore, the result has shape 3 8 9 10 11