This EU-China investment deal I feel really came in the aftermath of Japan jumping on-board RCEP(despite all their previous statement on how they wouldn't join if India doesn't join). That move by Japan is really a huge stab in the back for US.
Once Japan goes all in everyone else realises if they don't sign a deal with China they will have an increasing smaller slice of the Chinese market, hence EU's decision.
I think I read somewhere that actually China already has some investment deal with some EU countries, this deal is kind of unifying such deals.
Also, a few provisions in the deal is what the American got from Phase 1 trade deal, so kind of hypocritical if Americans try to thwart it.
Furthermore, one of the most important provisions which the EU really wanted is the Geographical Indication label. The U.S is reluctant to enact such provisions in the past. I am confident that the EU will use China's acceptance as leverage to force the U.S to accept it as well. However, Biden risks losing the midwest and farmers if he does that.
P.S. I am puzzled why pundits and think-tankers regard deals like CAI, RCEP, TPP as if those are magic tome that instantly buffs your countries. Pretty sure that deals are done in step and the implementation can take years.