MATLAB variables store the real and imaginary parts in different areas of memory. For a real variable, the imaginary part is not physically present (the pointer to it is NULL in C terminology). The isreal function in MATLAB returns false if the imaginary part of the variable is physically present (regardless of whether it contains all 0's or not). All of the MATLAB functions seem to check each result to see if the imaginary part is all 0's, and if it is then it is physically deleted, resulting in a real variable. There is no automatic way around this that I am aware of ... you will have to force a result to be complex manually by appending a 0 complex part (e.g., via the complex function) if you want the downstream stuff to see it as complex.
I should add that there are a host of operations that you can do in MATLAB that will return a "shared data copy" of the input. Examples of these are:
B = A;
A = 1:5; B = A.';
A = rand(2,3); B = reshape(A,3,2);
For shared data copies, the imaginary part is physically retained even if it is all 0's. Basically, most operations that do not change the data or its arrangement in memory often return a shared data copy.