I guess common sense and logic are being ignored right now due to the off-season free agency meltdown.
The Texans knew Brock was not their quarterback of the future. They realized they overpaid for him. They found a trade partner willing to eat his contract, which was a miracle given the size of his contract and how badly he played last year. They had to find a perfect trade partner, one that wanted draft picks more than money and the player, and one that had the salary cap to absorb the contract and they found one in the Browns. They would have made that trade even if Romo had already been traded to another team, because it was in their best interest.
Let's say you bought a house two years ago that you are upside down in, meaning you owe more than the house is worth. You want to move and have your eye on a house that several people want. A buyer approaches you and says they will not only buy your current house for market value but also pay whatever difference you would owe after the sale. Do you accept that offer without knowing whether you will be able to buy the house you want? Absolutely, you do! Why? Because there are two issues at play, not one. First, you have a house that will be very hard to get rid of yet you someone is offering you a way out of that mess right now. Second, you have a new house you want to get. The first problem has to be solved before the second problem is even an actual option, so you focus on solving the first problem first.
Do you really think the Texans have no other plans in place assuming they do not get Romo? They have likely talked with other teams about trades for veteran quarterbacks, especially current backup quarterbacks, where they could help the other team like Cleveland helped them, meaning eating a bad or no longer wanted/needed contract. They have also likely talked with other free agent quarterbacks as well.
Sure, Romo is likely their main target, but they also realize that Romo may end up somewhere else. Either way, by trading Brock, they fixed the immediate problem with his contract and, more importantly, they have made it possible to move quickly should they make a deal with Dallas or Romo is released or some other quarterback option becomes available.