The socket is ideal for devices or circuits that use a standardised 5.5 x 2.1 mm DC power plug, e.g. power supply units, chargers, small electronic devices or controllers.
The lock provides a mechanically stronger connection - important when moving the unit or when a stable power supply is required.
Through-hole mounting also provides good mechanical strength on the PCB board and is often preferred over pure SMD solutions for devices with more robust requirements.