Government raids on foreign companies have undercut Beijing’s open-for-business message, reinforcing fears about the risks of operating in a market that remains essential.