The M3/M4 are still built in Germany, so it's not in any way clear why BMW would build the S58 in America, export it to Germany, build the cars and ship them back. As opposed to building the engines in say, Austria, which is what they're
actually doing.
The S58 was already being built in Austria for export to the US, this move just expands that production. See below an X3M window sticker for reference: