Agreeing that publicly one should follow his congregations custom, this only applies to "public" prayers such as Barchu and Kedusha. With private prayers one may pray with his own custom. For example, if you daven nusach ashkenaz but are in a nusach sefarad shul, they say the beginning of pesukei d'zimra before ashreimizmor shir chanukas habayis but you could still say ashreimizmor shir chanukas habayis first as is your custom.
In your example, probabyprobably he chose to follow the congregations custom during the normal order of prayer, but when he is saying something by himself he chose to do what he is used to.