The point isn't that it may cause you a problem. The point is that the license is the structure by which people understand how they can use things, and the lack of a license is generally taken as "don't touch this" by the larger community. It's essentially opting out of the larger pool of contribution, which is of course totally valid and your right.
It depends on whose copyright you infringed upon. If it's a company, you can bet your ass they'll sue you if they find out. If it was an individual, then probably nothing will happen. But that doesn't mean you shouldn't use a free software license for your software. Many people will refuse to use it, because they cannot be sure they are legally allowed to do so.
If it's a company which cares about copyright I'm sure they will put a license on it. The scenario we're talking about is where people put up code without bothering putting a license on it. I have a hard time seeing anyone would be sued for using that since the author clearly don't care.
That's not how the Berne Convention works. Copyright is applied automatically. You can't just assume people who publish works without a license "don't care". Maybe they don't want to give you a license and want to retain all of their rights under copyright law.
I always put licenses on all of my works (including presentations, blog posts, images, as well as code obviously). All of them are licenses which make it clear that I wish to provide people more freedom than granted by default under copyright law (in counties that follow the Berne Convention).
A license is permission to use rights reserved under copyright. Someone who cares about copyright but doesn't intend to give any permissions will not provide a license.
Refusing to put a licence on your code does stop people from using it.
If you really don't care, just slap a MIT license on it and be done with it, no one will bother you afterwards.