Probably illegal, but its worth a shot. Let me know how it goes.
It would succeed no better than showing up with a barrel at a burger shop and start filling it from the free ketchup dispenser.
Not to mention the mechanics of converting the ketchup in the barrel to usable energy would be inefficient and convoluted at best. Better to find some other way to power one's Bitcoin mining rig. :)
Though, you could likely dodge any criminal charges by way of insanity in that scenario!