Why the value of expression is not equal to the assignment?

After CVX has solved or inaccurate/solved, the CVX variables have their optimal values. But CVX expressions do not necessarily.correspond to the optimal values of CVX variables. CVX makes sure the expressions are properly evaluated for purposes of conducting the optimization and populating cvx_optval, but the numerical values of CVX expressions after CVX completes do not necessarily correspond to the optimal values of the variables. Therefore, you should recompute CVX expression values using the optimal values of CVX variables if you wish to know the optimal values of CVX expressions. This reflects a design decision, different than that in YALMIP, to not automatically do this for you.