This is correct behaviour for symbolic expressions.
The symbolic toolbox assumes that any unresolved symbolic variable name will resolve to a scalar.
will be scalar 0 because it assumes scalars and applies commutivity.
When you work with arrays in symbolic toolbox they must be fully sized ahead of time, and the expression is evaluated on those arrays generating an array of results, not the underlying expressions
syms A [2,2]
syms B [2,2]
C = A*B
C will not be stored as "variable named A times variable named B" : the matrix multiplication will be done and C will be stored as all the appropriate sub-expressions.
With the symbolic toolbox, there is no easy way to code "This variable stands in for any array that will be replaced with an actual array later and array operations are to be done on that array when it is resolved." The symbolic toolbox is not designed to permit that.
So when you str2sym then any symbol will be assumed to be scalar and operated on that way. The dot version of the operators are not used because all the operators that make it into symbolic expressions are operating on scalars.
Your difficulty is that you are trying to take the character version of the symbolic expression and use it as a matlab expression. However, the language used by the symbolic expressions is not matlab, and char() of symbolic expressions is only sometimes the matlab code that you would hope for. For example the symbolic beta function has its parameters reversed from the matlab function, and the expression 1 <= x & x <= 5 has char() that uses characters that are not valid in MATLAB.
Madhan already pointed you to the solution: use matlabFunction, which will generate correct matlab code (except when it fails, which it will if you had a vpaintegral call for example). My post here is to explain why you were seeing the problem.