Maybe that punch in third year had knocked his head hard enough against the stone for his personality to split into two. Two very different versions of Malfoy. The nasty one was easy enough to understand and came from a place of ignorant and arrogant upbringing. The other one was confusing and didn’t make sense.