For example, look at salt pork. 1 oz has only 200 calories, but 30% of your recommended daily sodium. Assuming a diet of mostly salt pork (which I understand was common, especially among certain professions), that would be 10 oz per day, or 300% of your daily sodium every day. If people are working hard (and of course they were) then they would have to eat even more. Sailors apparently need to eat up to 6000 calories per day. That gives us a whopping 900% of your daily sodium intake per day. Throw in pickled vegetables and other salt preserved foods, and I'm struggling to understand how people weren't dead within a week from kidney failure.
Salt was, and still is, an important way of preserving food by desiccating it, making it very difficult to rot. Salting was not only used for pork, you can do it as well with fish, and indeed it was very commonly used for fish such as cod. So useful was this type of preservative for fish, that it allowed for cod to be consumed and to become popular in the inland parts of Spain.
There were other important methods of preserving foods that survive to this very day. Escabeche, which is a type of sauce based on vinegar, oil, laurel, and wine, creates an acidic solution that maintains food in good condition, and very tasty, for a very long period of time. This method has been well known in Spain since, at the very least the earliest years of the 14th century, when "escabeyg" is found in the Llibre de Sent Soví, a cookbook from that period. One can use escabeche for preserving a great many things, like partridges, mussels, tuna, chicken, grouse, and whatnot. One of the favourite foods of Emperor Charles V (also known as Charles I of Spain) was oysters in escabeche, which he received regularly from Flanders by the batch. Escabeche is also quite recommendable for the preservation of vegetables, which also makes them delicious.
Brine has also been used since time immemorial for preserving fish, vegetables, and even some fruits, like the very popular pickled lemons in the times of Al Andalus. However, the most popular thing to be preserved in brine have always been olives and cucumbers, and those lings could last for very long periods of time.
Another alternative to escabeche is preserving the foods in oil or in vinegar, without any other mixtures, which will protect the goods from humidity, and hence from spiling and rotting. This was popular with certain types of fish like European anchovies, preserved either in oil or in vinegar.
Curing meat by smoke was another way of preserving food, that's how you get bacon, blood sausages, sausages, chorizo, and the lot. You also get cured hams, and I have to say that Spanish cured hams have always been quite well regarded. The process of curing and smoking was also done to fish, and in the South of Spain this method was very popularly used for tuna, which could be dried, cured, and/or smoked, and then be exported. The importance of tuna in the economies of the villages and towns in the south like Cádiz, Rota, Sanlúcar, Medina Sidonia, or Almuñécar cannot be understated, to the point that wars were waged between the Marquess of Cádiz and the Duke of Medina Sidonia in order to control the fishing of tunas. Furthermore, tunny fish can be found in the coinage of Sexi, Gadir, Asido, Iptuci, and Salacia, in pre-Roman times.
Almíbar, an oversaturated solution of water and sugar, was extensively used for preserving fruits for long periods of time, and it is still in use today. The preparation originates in Muslim practices, and that is quite notoriously reflected is the etymology "al maybah", which means syrup.
Let us not forget the friendly leguminous plants, the importance of which can never be understated: lentils, chickpeas, and of course the beloved beans when they arrived to Europe via the Columbian exchange. These plants are very nutritious, they have never been expensive, and they last from one year to the next when dried.
Fruits, vegetables, cereals, legumes, and oil (or other type of fat) were the basis and the lion's share of nutrition in the past. You should not only think of meat, but of a much more diverse diet that relied heavily on legumes and cereals (wheat, rice, corn, barley etc).
Speaking for the sailors you mentioned, and specifically for the crew of an English East Indiaman, the rations did not consist solely of salted foods. Also, the process of preparing and cooking salted meats removed a lot of the salt.
A typical meal on board an East Indiaman would consist of some kind of salted meat (typically pork, sometimes beef or fish) but also biscuit or bread, very fresh weevils, hard cheese, dried peas or beans, beer, water and some lemon or lime juice. So not everything in the meal was salted and there was water available.
If a ship stopped by at a port it would take on fresh victuals, so for a while there would be fresh meat and vegetables before reverting to the preserved stuff.
Some ships also carried livestock that could be slaughtered as an occasional treat.
Regarding how salted meat was cooked, I don't have information on East Indiamen specifically. However, on land, excess salt was first scraped off the pork. The pork was then soaked in water for hours to remove more salt. The water was changed several times in the process. The pork was then ready to be cooked.
Salt pork could be fried or grilled, but given the number of men to feed it was more commonly boiled in a stew or soup, which served to dilute the saltiness even more.
Eating salt meat on board a ship would have been a bit like eating bacon for every meal. Granted, it was still salty and was going to get tiresome after a while, but it was bearable and wouldn't kill you.
You might like the appendix to Three Galleons for the King of Spain which discusses the diet of sailors in the Renaissance.
No people ever tried to live solely on salted foods. This is a situation only in your head. I don't know who gave you the idea.
The basis of every culture's diet around the world, except the Inuit, is starchy food. Potatoes, manioc, corn, wild rice, rye, oats, wheat, buckwheat, sorghum, domestic rice, yams, acorns, taro - the list goes on. These foods are dried to stay edible, as are legumes like beans, peas, lentils, and groundnuts. Then there's the annual harvest of tree nuts. Other vegetables are part of the diet. Roots can be dried out like garlic and onions, as can fruits like tomatoes, berries, apples, peppers, and others. Green vegetables can be dried.
Only after that do we get to fish and meats. Again, they can be dried without any salt involved, but salting or brining are good. So is smoking. Every medieval peasant kept a flitch of bacon up the chimney to add slivers to the pot of soup on the fire. Then there's acid pickling, or fermenting various foods. Think pickled pig's feet, sauerkraut, kim chee.
One thing salt meat did was to add salt to foods that lacked it. I'm thinking of modern laulau of taro leaves wrapped around rice wrapped around butter fish - and a piece of salted meat. Keeps the rest from killing you with blandness.
In the modern period, the professions most likely to be handed a lot of salt pork were soldiers and sailors. Their diet was founded on hardtack, which is one way to store flour in a humid environment, and without needing flour-tight containers.You can't eat this dried bread: you have to soak it. (See the YT channel Tasting History for some fun vids on hardtack.) So the cook breaks it up in a pot, chops up half-dried onions to go in there, rinses the slime off the salt pork but lets it provide saltiness. Think of the well-boiled tiny weevils as shellfish. They were another reason to cook the hardtack! IIRC, in Two Years Before the Mast, Dana describes such meals as ordinary in the mid 1800s.
A Caribbean pirate's salmagundi would add garlic, hot peppers, and anything lying about to that.
Flour, oatmeal, grits, and such need about a half teaspoon of salt per cup of flour, meal, &c, to not be too bland, no matter how you prepare them. On board Thor Heyerdahl's Ra expeditions they stretched water supplies by making the breakfast oatmeal with seawater. So a spot of saltiness can be quite welcome.