We relinquish all kinds of data to tech companies in exchange for convenience. We hand over our location, our heart rates and even imprints of our eyeballs because we want to order an Uber, track a workout or get through airport security faster. But we expect one thing to be mostly kept private: our medical histories.

In a way, our health information is the last sacrosanct piece of personal information. That’s why people were so surprised to learn Google had a deal with Ascension to handle tens of millions of patient records,...