It wasn't a bad move at all. They were also able to take off a few hundred million from the price because of the hack. Made the deal even better.
Verizon will definitively be the 3rd biggest advertising platform after Google and Facebook. Not a bad place to be when you already make billions in profit from your Verizon Wireless oligopoly.
About Tumblr. Yahoo has already written off at least $700M of its original purchase price. So Tumblr isn't a big factor when buying Yahoo.
Note: In no way do I like what Verizon will be doing. Using their vast amounts of data on users via their internet/phones services and now all the web properties they own for advertising and targeting is awful for privacy and plain old decency. I just mean strictly business-wise, this is likely to be a great deal for Verizon.