All medical research need patient data and every newly admitted medicine has to withstand rigourous (data-driven) testing and this did not change with new technology at all.
Only 2 things changed: 1 - Nowadays with GDPR and increased alertness on data protection (which is a good thing in general as the possibilites evolved more quickly than the regulation), people are explicitly asked about these things. 2 - The big internet companies like Google/Facebook (which did not behave well in the past and are thus partially responsible themselves for the public mistrust in these cases) have most experience/talent for the development of ML/AI-based technologies and are deploying this in new areas like medicine.
I don't get all the negativeness here. I vastly prefer Google/Facebook working on medical progress than working on improving ad targeting. Imo they should be encouraged to use their expertise and resources for progress in these fields. IF they are indeed found guilty of breaking promises and harvesting highly-sensitive data, shame on them. But this is not the case here.