It's more complex and doesn't always go like that. If X' is a superior product objectively, then company B can find investors willing to back them and take on company A. Company A could itself be an investor in company B
"$35BN Match Group file multiple lawsuits against muzmatch following repeated failed acquisition offers" -
"Lets provide the better product/service at a lower price" is, by far, not the most common business tactic.
- Law for frivolous lawsuits created with criteria
- Company A engages in said behavior
- Company B files motion to dismiss based on said criteria
- Judge agrees and dismisses lawsuit, and warns of contempt if the behavior continues