Not all code-shares are the same.
LH and UA just started to share all costs/earnings on all LH and UA transatlantic flights (be it code-share or not).
Other code-shares agreements let the code-sharing airline (UA) actually buy seats (for an undisclosed special price) from the actual carrier.