A lot of people are unaware of license terms that apply to code pieces posted on Stack Overflow or the internet in general. This is from my own experience but is also stated in a paper here. And some people intend to publish their code in a more permissive way.
It would be nice to have an option when posting code to explicitly choose the license or at least show below the code embeddings a link to the CC BY-SA license. Sure, there is a small written hint in the footer of the Stack Exchange sites, but most people don't read small things in the footer.