Why Can't You Add Friends on Steam With a Free-to-Play Game?

If you cannot add friends on Steam while only owning a free-to-play game, it is because some social features are reserved for accounts that have purchased a game.

Steam restricts friend-adding and certain features for free accounts to help curb spammers and hackers who might otherwise abuse the system. Buying any game upgrades your account and unlocks these premium features, letting you connect with friends freely.