Actually it's not theft in the US, it's intellectual property rights infringement. The way you're defining it memes are theft. There is also a thing called fair use when you don't use a significant portion of a copyrighted work, which is why memes and using small bits of code aren't infringement when you use them in different context.