Due to the fact that landlocked countries face the threat of being surrounded by foreign countries, negotiating and implementing a deal with a larger coastal country has security benefits for the landlocked country, and access to trade routes that would otherwise be blocked.