Yes, it is legal to collect and store customer data as long as businesses follow privacy laws and regulations such as GDPR and CCPA and obtain customer consent for data collection and storage.