In the early days of flight, it was up to the pilot to report why an incident occurred – assuming they lived to tell the tale. In 1905, Orville Wright was nearly killed in a particularly hard landing that led to significant developments in sustainability and control.
Today, we have very sophisticated, complicated aircraft that regularly fly hundreds of passengers thousands of miles. When an incident occurs, accident investigators want detailed information to help them piece together the cause and to enable recommendations to be issued to improve future aircraft safety. They need data to help them do this, but normal recorders will likely be destroyed in a crash.
Flight Data Recorders (FDR) were developed precisely to ensure data could survive accidents. They generally consist of a storage device encased in protective materials. Regulations pertaining to their inclusion on certain classes of aircraft, and their resilience to various environmental factors, were introduced in the 1950s.