You are seeing "structure expansion", which is similar to cell array expansion. The output of
is the same as if you had typed
patient(1).billing, patient(2).billing, patient(3).billing, ...
as a comma separated list. These will be treated as if you had typed separate arguments, so if for example you had used
that would be the same as
and it would then try (and fail) to use the 28.5 as the dimension number that sum expects for its second argument.
works because  is the list building operator, and with comma separated lists is equivalent to horzcat()
being well defined