Deuteronomy, like all of the Law, is casuistic: case law, to give hypothetic situations to guide a judge to know on what bases and principles to make juridical decisions. Deuteronomy. 22.23-27 is giving a judge principles such as...
- Was the woman complicit and consenting (the idea behind "no scream", v. 23)? In that case, she's as guilty as he is. (v. 24)
- Did she try to defend herself? (The woman in v. 23 didn't try. The consent of the woman is assumed.)
- If she was truly raped (obviously against her will and consent), is there cause to assume her innocence and victimhood? (v. 25). If she is innocent, the man only is to be judged for the crime (v. 25-26).
- Scenario 3 (vv. 28-29) is the seduction of an unengaged woman. As it would be more difficult for a woman to find a husband if she had been sexually involved with another man before marriage, the guy must provide for her economic security (the bride price).
Notice in all three instances the man is guilty. Scenario 2 vindicates the woman. Scenario 3 provides for her economically, since her rape would jeopardize her financial future. Both scenarios 2 and 3 are designed to protect the woman who was abused.
The law is telling the judge (1) look for evidence, (2) talk to any witnesses, (3) don't assume the woman is guilty, (4) protect her if warranted, and (5) provide for her financially if warranted.
The "scream" is the text's way of telling the judge to find out if she was consenting or victimized.