He didn't get all of Zack's memories. A good example is him not recognizing Aerith at the beginning of the game nor when he fell through the roof of the church.
It's been explained somewhere before, but a more accurate representation of what happened is some of Zack's and some of Cloud's memories were meshed together, but definitely not all.
As a side note I just want to say that the way the DMW played into the ending was purely genius.