My question is what is the rationale of such law?
What would be the alternative if you would not have a right to be silent? Let's say there would be a duty to say the whole truth.
- What should be the punishment if somebody fails to tell the whole truth?
- How would you determine if somebody failed to tell the whole truth?
- What is the truth anyway? Isn't the whole purpose of a trial to find that out?
- And would then others (everyone) also need to say the whole truth or only the suspect?
- And what if someone just says he cannot remember?
You see, there are a lot of unsolved problems with the alternative and going by the right to remain silent is at least the much more practical solution although sometimes you are actually ordered to testify and tell the whole truth. Often enough weak memories happen then.
You can assume that everyone would lie if telling the truth would mean to accuse himself. So you would still need to prove him guilty but may be forced to additionally punish him for not telling the whole truth. This may be a bit too much punishment for little gain.
With this I already included that torture is out of the question.