There is a 1996 federal law that prohibits lawyers from contacting relatives within 30 days of a plane crash. The law was designed to prevent the undignified solicitation that previously occurred following a major air disaster. The federal government believed that the family members should be given 30 days to put their affairs in order before they were contacted by personal injury attorneys.
In situations like air disasters that are extensively investigated by the FAA it’s fine to wait for 30 days before contacting a personal injury attorney. But in situations where the only investigation is performed by the potential defendant (e.g., falling merchandise at Home Depot) it makes sense to contact a personal injury attorney right away to make sure evidence is preserved.