Why was the Panama Canal built in Panama?

The Panama canal was built in Panama because that is the narrowest point between North and South America.