You do not need know or understand Vitamin C and scurvy to want to bring along fruits or vegetables with you.
Why would you want to bring them? Vegetables were what you ate when you couldn't get meat. Fruit was a snack. Neither were part of the ideal diet for a working man, back then. What people ideally wanted to eat was meat, as much as you could get. And conveniently, salted meat lasts better than anything else for long voyages at sea. Flour lasts fairly well, so you had a ship's baker to keep you supplied with bread for filling. Apples (if you select the right type) also store well, so they were stocked too. Dried beans would also be a possibility. You wouldn't have a great deal of variation in diet on long journeys though.
You also need to consider the nations involved in long ocean voyages. The major nations in this were the British, French, Spanish and Portugese. Whilst all of them knew about how to pickle vegetables, it's probably fair to say that they don't form a major traditional part of the diet of any of the countries. Pickled vegetables certainly aren't well-loved staples in the way that sauerkraut or kimchi are in their respective countries.
Wanting to eat pickled vegetables on a voyage would have been an extreme dietary oddity, which could only be exercised by a captain. Since most British captains shared the appetites of the day, that meant meat and more meat. Cook was considered an oddball for his experiment with sauerkraut - and of course a genius afterwards.