If you intent to sell, give away or send your Apple HomePod to Apple for repair. You should ensure that your Apple HomePod has been returned to its factory default. One way to do this is to Restore your HomePod to its original settings. So in this video we demonstrate how from within macOS you can restore your HomePod.
Also if your Apple HomePod stops working properly, performing a restore might be a useful troubleshooting tool. However, as performing a restore will also return your HomePod to its factory default. You will have to reconfigure it once again, after it has been reset.