Wikipedia article says -
On 6 July 2006, the Government of Germany decided to finance an advance to start the construction, about €170 million, planned for delivery in 2012. The two submarines cost, overall, around €1.3 billion, of up to one-third was subsidized by Germany. In 2010, both Israel and Germany denied having talks regarding the potential purchase of a sixth submarine. Yet in 2011, Israel ordered a sixth Dolphin-class submarine, for which it was reported to pay the unsubsidized cost of US$1 billion. However, in July 2011, during a meeting between German Defense Minister Thomas de Maizière and Israeli Prime Minister Binyamin Netanyahu, and Defense Minister Ehud Barak, an agreement was reached to subsidize €135 million of the US$500–700 million cost of the sixth submarine.
Why does Germany subsidize the Dolphin-class submarines sold to Israel?