Die Hard is obviously John McClane's movie. He's the hero of the story. He vanquishes the villain and lands the girl. But we can't forget that while he's running, climbing, and hurling through Nakatomi Plaza, Hans is also on a bit of a quest himself.
It may not be honorable, but Mr. Gruber really wants what's in that vault. And there are a whole lot of obstacles and tests along the way (which Theo handily takes care of—for the most part). So while McClane is questing for his wife, Gruber is questing for his dough. It may be less noble, but it's no less essential to him. Just check out the soundtrack when he finally gets it open: total triumph.
Gruber's cracking into the vault is paced in such a way that it parallels McClane's quest to take down Gruber and save Holly. They're both on simultaneous Hero's Journeys. It's just that McClane is actually a hero, and Gruber is, well, not.
So it makes sense that even though Gruber achieves his objective—he gets into the vault and packs up his bearer bonds—he's thwarted in the end. Being decidedly not a hero, he doesn't get the happy ending of a typical hero's journey. Nope, he gets hurled off a high-rise instead.
P.S. Did the Nakatomi vault throw you off your thriller game? That's because it's a MacGuffin. That's the point.