Well, Kishi can take a lot of paths, i will post 2:
1. Yamato is a fool and he tells everything about Naruto and all plans of the alliance.
2. Yamato is playing fool seeking a chance to gather info about Akatsuki.
Yamato is a top ANBU member, please Kishi don't ruin another reputation, ok?