By showing us, the viewers, that Tripitaka is the vampire, it keeps us guessing as to what exactly is going on - is it an impostor, or is it something to do with his illness that has made Tripitaka a vampire?
Tripitaka is arrested along with the others, except for Monkey who claims to have turned against them and Buddhism. This leaves Monkey free to investigate and he discovers the real shapechanging vampires. He exposes them to the king and Tripitaka is cleared.
This is a relatively straightforward story, but well-executed, and uses each of the characters well - Pigsy seems a little out-of-character at one point, in readily volunteering to find the vampire, but really he just wants to show off and it is, of course, Monkey's cunning that saves the day.