As noted in the comments, as seen during the events of Captain America, Winter Soldier, Hydra had infiltrated every level of SHIELD by the 2010s. We know that SHIELD was already doing alien weapon research (The Destroyer weapon that Coulson used) and Hydra Tesseract weapon research (Hydra guns Cap found on the helicarrier). They even "converted" Hydra scientists, like Arnim Zola, whom in turn decided to poison SHIELD from the inside.
By 2010s, Hydra agents were everywhere, from low level rank and file, special agents (Jasper Sitwell), elite soldiers (STRIKE team leader Brock Rumlow), the World Security Council (Alexander Pierce), and even senators (Senator Stern, the prick from Iron Man).
These two factors combined, would have meant SHIELD either intentionally set up to study the Leviathan for further benefit, or Hydra intercepted it, as they did the Scepter in the Winter Soldier stinger.
It's highly likely that the Hydra base was a black site bankrolled by SHIELD until it collapsed.