Source Engine – What is a “hairball”

garrys-modsource-engine

I was playing around in GMod one day, and I noticed a strange command:
CreateHairball
Curious, I tried it out. Strangely, it created several rope-like NPCs that flew away randomly. Killing them crashed the game.
Not only was it in GMod, but Half-Life 2 and Portal had them as well. But what exactly are they, and why are they there?

Best Answer

While Valve didn't explicitly explain why they added it, it feels like a test.

On the Valve Developer Wiki Page, it states:

This console command creates 100 ropes, each with 3 segments, and simulates them physically while moving them about.

In this text, what you must see is "simulates them physically while moving them about", it kinda proves that it was a test.

Also in a thread in the Facepunch Forums, few users stated that it was a test. Also one said that it might be for liquids (the random moving effect of them, by liquids for example I mean the gels in portal 2, while they are mid-air (image source))