Medieval people totally knew how to boil water and leave salt behind, and the most basic bread was probably an accidebtal discover when people used to put hard grains in water to soften them, someone had the idea to ambush them first
People back then were just as smart as people now. Knowledge accumulates slowly over time and that's that limits progress. We discover things slowly but once we know them we discover even bigger things I'm a feedback loop.
They knew you could, but mostly didn't because it takes a ton of energy to boil off water. There was no petroleum, no coal, so you would need a bunch of wood. So you use a bunch of wood to boil a liter of ocean water and you would get about 35 grams of salt. It just wasn't worth it.