I can think of a building plan metaphor I would perhaps use for an actual five year old.
Think of the source code as a map of a building. If the map shows a secret tunnel, or maybe a door that’s always open, or perhaps a low fence without lights… well that shows you a way in.
But if the plan shows good security, all doors safely locked and no unguarded way inside, then having the plans doesn’t really help you to break in.
Same with software. The source code is only a plan. The actual running application is somewhere else. Created from the code but living an independent life.
Source code leak is only a problem if it shows a flaw. If the source code is secure then it’s safe to show off.
Latest Answers