Looks like the previous owner quickly greased the hub before turning the bike over to you, but did a sloppy job. First, the dust cap wasn't seated propertly, and next, the locknuts were probably not tightened enough and ended up too tight when the wheel was put back in, which is what you noticed.
Luis