The purpose of external ventricular drainage is to divert fluid from the ventricles of the brain or the lumbar space of the spine and allow for monitoring of intracranial pressure.