From the Avengers Movie:
Bruce Banner: Are you here to kill me, Miss Romanoff? Because that's not gonna work out for everyone.
Natasha Romanoff: No. No. Of course not. I'm here on behalf of SHIELD.
Bruce Banner: SHIELD. How did they find me?
Natasha Romanoff: We never lost you, doctor. We've kept our distance, even helped keep some other interested parties off your scent.
We've seen instances on Agents of S.H.I.E.L.D. that not all beings on the index are necessarily locked away at the moment of their discovery, but they are all monitored in case they lose control or become immediately dangerous and possibly eventually detained or experimented on.
Obviously, S.H.I.E.L.D. has been keeping an eye on him just in case. I agree with Royal Canadian Bandit's answer that their motivations for keeping him around would have been the eventual potential for his help and cooperation as they did end up needing in the Avengers movie.
Additionally, in the Agents of S.H.I.E.L.D. TV Show we learn about a place called 'The Retreat' in the episode 'One Door Closes'(S2 E15) because
Skye/Daisy is sent there once her seismic powers are "awoken".
While she's there, while investigating internet issues, she peels back some board on the wall to reveal
A massive fist-print.
http://en.wikipedia.org/wiki/One_Door_Closes
Then, in 'Afterlife'(S2 E16) when
Coulson is being hunted by the other S.H.I.E.L.D. agents and they're attacking the cabin, he mentions to Hunter that the cabin was built to withstand the Hulk
So this implies (with our current knowledge of the M.C.U.)
That massive fist print belong to none other than the Hulk himself
What this actually means, I'm not sure. We would need more details but from what we know somehow we can probably speculate
that Bruce Banner was, as you put it, "locked away" in the Retreat, built by S.H.I.E.L.D., at some point in his angry life. Whether they put him there or he put himself there and when in the M.C.U. timeline it happened we do not know