Why did Cortes take Montezuma hostage?

Why did Cortes take Montezuma hostage?