Another story to teach children what happens to people who don't do what God and the people who say they are his chosen ones, want them to do.
The story of Jack and the beanstalk could have just as easily been a bible story had someone made it up soon enough to get in included.
Jack stood for God's children who sell the family cow (spiritual heritage) and succumb to selfish longings. The magic beans symbolized Man's foolish teachings that appear fertile and valuable. The Giant stood for Satan's organization. The beanstalk stood for worldly pursuits and ambitions that can, for a time, help one achieve lofty positions in this system of things. The goose that laid the golden egg is the riches that can be sought after and aquired at great danger to our spiritual lives etc etc...