I had my screen repaired under warranty by them. They factory reset to keep your data safe.
They actually make you do it, before they even touch it. They allow you to do it in store, and will guide you on how to back things up, and use their WiFi to do it.
Definitely can be annoying, but Lemmy is all about privacy, and there’s no way for a company to steal your data with their fancy diagnostic tools if the phone is factory reset.