Re: Pleading the 5th does seem odd nowadays
No, it is not to prevent torture, it is to prevent you being charged with a crime for refusing to assist with your own prosecution. One of the foundations of our justice system is that everyone must be presumed innocent unless *proven* to be guilty. The burden of such proof lies with the state, and (with recent exceptions) there is no obligation to assist the prosecution.
One of the first things anyone who is arrested on suspicion of a crime is told is, "You do not have to say anything ..." A person who is being questioned as a witness OTOH does not usually have that right, because it is assumed that they are not at risk of prosecution. If however they realise that answering the question may place them at such a risk, they can gain that right. Otherwise the police could easily get around the "right to silence" by simply not arresting the suspect but instead forcing them to answer questions as a witness.
Consider the case where you are stopped while driving at 50MPH in a 40MPH zone. The nice police officer asks, "How fast were you driving, sir?" If you reply, "No comment," then absent any concrete evidence of wrongdoing you will be allowed on your way. Without having the right to not to say anything that might incriminate you, you could be prosecuted for refusing to answer.
In the UK, that right has already been removed in a number of situations. You can, for example, be prosecuted as the registered keeper of a vehicle if you refuse to name the driver of that vehicle if it was caught committing certain offences - even if the driver was yourself. You can also be prosecuted for refusing to tell the police how they can decrypt any encrypted data you have.