Even though they all translate as "why" and there's no defined semantic difference, they can be used to express different notions and motives. Not really that much in a written text, but mainly in conversations. And also there are slight differences in meaning in the first place. "Wozu" is mainly asked to find out for what purpose sth.is (to be) done, "weshalb" is more asking for the motivation behind it. "Wieso" usually expresses discontent with the question and/or the possible implications. Here's a link to a page where non-native speakers discuss this question:
https://deutsch-werden.de/de/wieso-warum-weshalb-weswegen-richtige-verwendung
It's one of those things that makes it hard for non-native speakers to blend in 100% as it's not completely explainable for most native-speakers as well.
https://deutsch-werden.de/de/wieso-warum-weshalb-weswegen-richtige-verwendung
It's one of those things that makes it hard for non-native speakers to blend in 100% as it's not completely explainable for most native-speakers as well.