Canon introduced the EF mount to the world in 1987. At the time it was the first fully electronic lens mount on the market and offered faster autofocus than the competition. The all-electronic nature of the mount means that the oldest EF lenses will still work properly on the newest bodies without any compatibility issues.
The decision to completely scrap the FD mount was not a popular one at the time, but it allowed Canon to wrest control of the professional market away from Nikon.
One of the main advantages of the EF mount compared to Nikon F, Pentax K and Sony A is the shorter flange distance. The EF mount has less distance between the back of the lens to the image plane, allowing for the easy use of lens adapters. A shorter flange distance also allows for more effective wide-angle lenses at lower prices.