What is the little lock icon for in the top right of the editor?

It doesn't prevent selection of an object so what exactly is it for??

It locks the current selection in the inspector, so you can't select other objects

Very useful if you want to drag lots of items onto it without accidentally clicking something else