Bike frame rusting immediately, cheap frame?
The fact that the frame rusted and the paint came off over 12 years is probably the fault of the paint not the steel. Even high quality strong steel alloys rust. Also, the conditions in a shed may look dry but there could be high humidity. The frame you have may not be the best, strongest steel alloy, but if you like the frame it’s worth refurbishing. 

If you strip steel down to bare metal it will react with oxygen and water in the air. You need to protect the metal with some form of oil or primer paint.

If you want the frame to look nice you’ll need to prepare the surface carefully and apply primer coats, color coats and clear coat. You can find many resources in how to do that in the internet. 

What I would do is protect the frame with WD-40 or similar while removing paint and sanding to get a good surface, then thoroughly clean with solvent and apply the first primer coat in one session. You don’t want the environment to be too humid or cold when you are doing this.



Update: I read through your question again and saw you mentioned rust on the inside and holes in the frame. You can remove rust inside with rust remover chemicals, but if the frame has holes all the way through (rather than pits) it's likely junk.