What's the function of the little lock icon on the Project Browser?

I have no clue, Unity Manual just says:

The lock icon next to the menu enables you to “freeze” the current contents of the view (ie, stop them being changed by events elsewhere) in a similar manner to the inspector lock.

But when I click on it, nothing seems to happen.

Thanks in advance.

When you click the lock your Inspector view will not change. So lets say you select an object with some scripts and hit the lock.

Now when you click on another Object in the hierarchy, it wont update your Inspector contents, it will still show the inspector details for the first gameobject.

This can be useful for dragging items into script fields etc.