Pixels have always had a considerable amount of issues, making some phone enthusiasts wary of them. We've even dedicated an unofficial bug tracker for the Pixel 3 here at Android Police to monitor the problems we've encountered. With the Pixel 3a and 3a XL being far from Google’s first attempt at smartphone manufacturing, we've been hoping that a lot of the wrinkles that plagued earlier models would be ironed out by now. It appears that this isn't the case, as many users are reporting that their new devices are randomly shutting down.
The problem affects both the regular 3a and the XL version. The shutdowns occur unpredictably during day and night when the device is not in active use. When it happens, the screen won't turn on anymore, and users need to do a hard reset by pressing the power button for ~30 seconds. Once that's done, they can continue to use the phone until another random shut down.
Some users tested if a third-party app was the culprit, but even when they used their device in Safe Mode (leaving only first-party software running), their phones would randomly shut down. One user also speculated whether the bug was WiFi-related since the problem only ever occurred when they were connected to their home network, but this case is too isolated to be confident that this is the issue.
While this appears to be similar to the Nexus 6P early shut down debacle (where affected customers should receive some compensation), I don't think it's related. On the 6P, shut downs usually occurred when the battery was running lower, and you didn't have to do a hard reset to get it up and running again.
For now, no fix is known. Users are returning their devices, hoping for new units that don't exhibit the behavior. Let's cross our fingers that this is the only bigger letdown the Pixel 3a has to offer, as we're growing tired of issue after issue with the Pixel line.