He was angry with her. His continuing charade of the "kidnapping" is a channel for his wrath and a test to see what her true feelings are.
In the original novel, Westley is described as seething over Buttercup's engagement as he watches her before she's kidnapped. His full state of mind isn't really detailed, but his later interrogation of her reveals much. He views her engagement to Humperdinck as a betrayal of their love, disregarding the fact that she thought he was dead, and that princes don't really take no for an answer. After all, he did keep himself alive among violent pirates, rose to own his own ship, and worked his rear off to make his fortune and eventually return to her. It did put a slight crimp in his plans to find her about to be married off. So he's rescuing her from Vizzini because he loves her, and screwing with her afterwards because he feels hurt and betrayed.
That this is utterly ridiculous behavior even for someone with true love driving him is pretty obvious, and it was toned down somewhat when the movie was made. That one sequence between the Battle of Wits and the Fire Swamp is pretty much all that remains of Westley's rage, which while he forgave her as soon as he understood she wanted nothing to do with Humperdinck, still plagued him further into the book.
Dragging her along also has the just-as-important twofer effect of keeping her out of Humperdinck's hands while they sort out their mess of a love story. It does no good to test her, reveal himself, and confirm their love if they can't escape together after.
Whether this ejects Westley from the category of hero or not can be left to the tastes of the reader/watcher.