*Assuming the keyboard has on-board persistent memory.
If the keyboard is unplugged or the computer is turned off, without persistent memory, it will revert to default. Always check the features of the keyboard before you buy. If you want to avoid using bloated, buggy OEM software, check to see if your keyboard is supported with software like OpenRGB. Typically this only supports the lighting configuration. Things like macros may still require you to install OEM software. And hopefully it has persistent memory to save it to the device.
It’s an industry security standard. Not a defect. If you don’t agree with it, fork the software and modify it to suit your needs.