OneAs everyone said, the reason is floating point precision. The solution? Variable-precision arithmetic, in the symbolic math toolbox, if you have it. Simply initialising your matrix using vpa like so:
T=vpa([0.5 0.5 0; 0.5 0 0.5; 0.2 0.4 0.4],100);
Gives a proper output from T^10000000000000000000
:
[0.42105263157894736842099364708441, 0.31578947368421052631574523531331, 0.26315789473684210526312102942776]
[0.42105263157894736842099364708441, 0.31578947368421052631574523531331, 0.26315789473684210526312102942776]
[0.42105263157894736842099364708441, 0.31578947368421052631574523531331, 0.26315789473684210526312102942776]