What is the purpose of the locks?

to serve as an elevator by raising and lowering ships passing through the canal

to make ships move more quickly as they pass through the canal

to help ships unload their cargo as they pass through the canal