Greetings khanif ... Where to start ... yes, when a drain gets clogged, water ends up inside the vehicle ... What causes it? ... any kind of foreign matter; bugs, plant matter, environmental debris, whatever ... Is it a bad design? ... I personally don't think so ... If you disagree, as the guy at the winshield shop seems to; they (you) will have to take it up with everyone who designs, manufactures or installs sunroofs ... How to correct it ... clean the 4 drain tubes; there is 1 in each corner ... if cleaned frequently, flushing with water will probably do it ... If cleaned only when there is a drainage issue, probably need a combination of mechanics wire (gentle use of wire coathanger for DIYers), water and air (pressurized) ... Let me restate
"GENTLE" use of wire, parts of these tubes are flexible and can be damaged ... Sunroofs are nice ... But everything in life requires maintenance ... After all, someone cut a big hole in your roof ...

Ref kiethy comment on drain tubes ... they are illustrated in the Toyota Factory Shop Manuals in the "Sunroof" section ... generally in all cars, they come down the roof pillars and drain at the wheel wells (behind the front ones and in front of the rear wheels) ...
Hope this helps ...