Why did my air filter fill up with engine oil?

After replacing the air filter, I ran a bunch of carb cleaner through the PCV valve. The PCV valve would rattle when I shook it, before I cleaned it

The PCV valve is supposed to rattle when you shake it. If it does not, there's something wrong. And even if it does, it also has to be the correct valve; see here.