Harbors require specific conditions and Memel was the only option for a significant port.
Interesting:
Treaty of Melno - Wikipedia
en.wikipedia.org
Provisions[edit]
According to the terms of the treaty, the Teutonic Knights for the first time renounced all territorial, political, and missionary claims against the Grand Duchy of Lithuania.[3] Samogitia was permanently ceded to Lithuania. The Prussian–Lithuanian border ran from sparsely inhabited wilderness in Suvalkija, through the triangle north of the Neman River, to Nemirseta on the Baltic Sea. Thus the Knights still controlled Neman's lower reaches and Memel (Klaipėda), an important seaport and trade center. Lithuania retained access to the Baltic Sea between the towns of Palanga (Polangen)[nb 2] and Šventoji (Heiligen Aa) – a distance of about 15 kilometres (9.3 mi).[7] However, Lithuania failed to develop harbors in Palanga or Šventoji as there was stiff competition with the nearby established ports of Memel and Libau (Liepāja)[8] and unfavorable natural conditions.[9] Thus it could not be considered a real access to the sea.[10]