No, it is not similar at all. There is the pesky little thing called 'copyright' which allows you to set terms under which you license your code. Stackoverflow, google and books all come with strings attached.
Your idea of how humans use content under copyright is mistaken.