MATLAB's analysis is not smart enough to recognize that you are not using i at all inside the parfor and not using any random values, and that therefore the result of every iteration is the same and so the loop over i can be removed in favour of just calculating the body once.
Instead, MATLAB notices that a and b appear to be output variables, and that they are not being indexed by the parfor index, and it thinks their value is probably dependent on the parfor index, so it is asking the question, "Huh? So which i value should be the one that is used to create the final a and b?" since you overwrite all of a and b each time .
Remember that parfor loops are rarely completed in sequence of the loop variable.
In non-parallel loops, it is valid to say
This is valid non-parallel code, and has the same net effect as if you had done
because each iteration of i is completely overwriting all of a .
But in parallel code, what does it mean for the "last" to overwrite all previous versions? Does it mean that the last to complete should overwrite all the previous ones? Does it mean that parfor should keep track of the highest loop index that writes to each part of each variable, and at the end reconstruct the answer "as if" the loops had been done in serial order?