The US and state governments are not private institutions. The money used to pay the contracts in question is collected from citizens who have to pay it. The government can't then turn around and gate that public money behind 1st amendment violating policy.
Right: and the voters have decided that they don't want their tax dollars to be squandered paying a premium because contractors have decided to boycott. If someone wants to boycott Taiwan and avoid any semiconductors from TSMC, then they're engaging in significant self-sabotage and it's wise for the government to avoid people engaging in this behavior.
There is no premium to be paid for boycotting Israel and that fabricated scenario has nothing to do with pro-Israel lobbyist driven first amendment violations.
Any time you reject a segment of the market, you're limiting the pool of available vendors. This obviously applies more to markets with significant presence in the boycotted country. Semiconductors for Taiwant, Israel makes plenty of sensor and software products.
The only thing segmenting the market are the anti-BDS laws. You can boycott Israel and still bid on a government contract and let market forces do the work.
This isn't an issue of market efficiency though, it's an issue of violating the first amendment.