To say someone is worth their salt is to say they are competent, capable, and deserving of their position and pay. 'Any doctor worth their salt would have noticed that immediately' means any competent doctor would have. The phrase affirms value and professional capability.
Salt was among the most valuable commodities in the ancient and medieval world. Before refrigeration, it was the primary means of preserving meat and fish. Whole trade routes, cities, and economies were built around salt. Wielding control over salt supplies was a form of geopolitical power. The Roman Via Salaria (Salt Road) was built specifically to transport salt.
Roman soldiers were sometimes paid partly in salt, or given an allowance specifically to purchase it — a 'salarium.' The word 'salary' derives directly from 'salarium.' The phrase 'worth their salt' thus draws on the same root: a soldier worth their salt was worth the salt they were paid in. Whether Roman soldiers were literally paid in salt is disputed by some historians, but the connection between salt and payment was real and well-documented. The English phrase is first recorded in the 19th century but draws on this ancient association.
Historians debate whether this was a regular practice or an occasional one. What is documented is that 'salarium' referred to a salt allowance or salt-related payment in Roman Latin. The connection between salt and pay was real, even if the exact mechanics varied across different periods and regions.
The phrase is almost always applied to people rather than things. For an object, you would more likely say it 'earns its keep,' 'pulls its weight,' or is 'value for money.'