Overview
The "right to remain silent " is a feature of US law, inherited, like much of the basic structure of US law, from the British law of the late 1700s. The right is also retained in modern UK law, in a somewhat different form.
The laws of many countries that do not inherit their legal system from the English/British source do not include the right. For example, the legal system of France does not. Such a system is clearly possible and need not be an arrant tyranny. Whether such a right improves the justice and fairness of the system could be debated, but it is not essential.
Note that it is not the case that a jury must pretend that a defendant would have testified in accord with a defense lawyer's opening statement. Indeed the jury is routinely told that opening statements are not evidence and should not be regarded as such. But a US jury is instructed that it should not draw any inference or conclusion of guilt because a defendant remains silent. A defendant is entitled, by remaining silent to in effect say to the state "Prove it!" and need not offer a competing version of the events of the alleged crime. In UK law, an accused person's failure to deny the crime may be considered at the trial.
Historical origin
The right arose as a reaction against certain specific practices considered to be abusive and unfair. In several English courts, particularly the Court of the Star Chamber, the practice arose of compelling suspected persons to attend and asking them under oath if they had commuted various illegal acts. If such a suspect had in fact committed the act asked about, then the suspect had the choice of confessing to a criminal act that carried a severe penalty (often death), or committing perjury, which was both a criminal act and was widely believed to be a grave sin, possibly condemning a person's soul to hell. Or if the accused remained silent, a serious punishment for contempt of court could be imposed, and that might be treated as evidence of guilt.
These practices contributed to the abolition of the Star Chamber court in 1641. The right to silence seems to have been established in English law after the Restoration of Charles II in 1660, as described in the Wikipedia article, although it was not fully established until well into the 18th century.
Current US Practice
The right in the US not only applies during a trial for the protection of the accused.
The right permits a person being questioned by the police to refuse to answer questions, with the assurance that such refusal may not later be used in court to help convict the suspect. Many lawyers advise anyone questioned by the police who are or might be under suspicion to refuse to answer any questions at all.
The right also means that a witness who is not a defendant may not, in a criminal or civil trial, be required to answer a question if the answer might later be used to help convict that person of a crime.
There are other implications of the right, and the details are too long to go into in this answer – whole books have been written about the right and what it does and does not cover, and the reasons behind it.
The general principle may be taken to be that when the government accuses a person of crime, it must undertake to prove the crime by its own resources, not compel the accused to assist in the process.
A system in which an accused is required to respond to specific questions can be imagined. To some extent it has existed at various times and places. It need not involve torture or coerced confession, but could require an accused, during a trial, to respond to specific questions. It would violate the principle that the state must make its case without help from the accused. The value of that principle can be debated.
Other Legal systems
In the article "French Criminal Procedures—Surprising Features of a French Trial from Bloomberg, it is said that:
The “right to silence” is limited. During a trial, the judges usually turn to the defendant and ask for the defendant’s response to the evidence in the record. A refusal to respond will lead to a strong inference of guilt. A defendant is not, however, put under oath.