Here's why:
* Al represents the element aluminum.
* P represents the element phosphorus.
* In ionic compounds, the metal (aluminum) is named first, followed by the nonmetal (phosphorus).
* The nonmetal's ending is changed to "-ide".