Transportation through waterways was much cheaper. From Yemen to Egypt/Syria, ships could move along the Red Sea. Ancient Egyptians and Romans both used Red Sea for trade with Africa and India.
The Arabians tribes could move spices through the desert on camel backs. But shouldn't it be more expensive than the Red Sea route?
If yes, why did the camel caravans in the desert through Mecca/Medina become so important in the middle ages for transporting spices from Yemen to Egypt/Syria?
Red Sea, despite being navigable seemed to be quite dangerous at the day. TomeĢ Pires, a 16th century Portuguese, in his Suma Oriental (available here, pages 8 - 12), describes it as full of rocks, navigable only by day and by only small boats. He claims it was very hard to navigate to Jiddah (jeddah) even harder past it and especially hard in the Gulf of Suez as the last part of the trip.
The merchandise usually had to be transferred to smaller boats for this last stage of the shipping route, adding costs. Pilots who could navigate these waters were rare and probably small in numbers and could dictate price. Still plenty of ships crashed. If a merchant really did not want to risk losses, then you pay premium and take the overland route. And if huge amounts of goods came it was possible that not all of it could go by smaller ships.
The sailing season was also influenced by Monsoons, which dictated when can a ship sail north or south. Add to this equally seasonal arrivals of European traders to Alexandria (just to point out, selling to Europeans was only one of the outlets for goods, but an important one).
If one arrived to late or to early he could either stay until the next season or use the caravans. Not to mention that the port customs duties and transfer costs were often substantial, so much that caravan routes could at times be competitive.
So there are plenty of reasons why one would not use ships. Still by the 16th century sending goods by ships up the Red Sea and Gulf of Suez was the preferred way to do it
In general though, it is rare and a long process (and usually never complete) that one route completely supersedes another. There were always and always will be goods traveling the 'old' routes, if not for the local trade alone. When Portuguese opened the Cape route and monopolized pepper and spice delivery to Europe, goods still flowed through the Red Sea and the Persian gulf, even though they could not match Portuguese prices of the cape route. Consequently the goods changed, as did their price and ultimate destinations. But some vestiges of trade remained.