It is quite easy to inject a javaScript code with a MITM-attack threw the public wifi into your device. So you could setup a monero miner on other peoples devices without their knowledge. Following from this I would recommend to avoid free wifis. You can search for Mining Monero with MITM attack [Bettercap] on youtube if you want to know more about it.