Drupal has a setting that allows you to put the site off-line, and show a maintenance message to the visitors. However, in order to determine that the site is in off-line mode and load the maintenance page, Drupal still needs to boot up to some extent, which involves loading several PHP files and connecting to the database. This may lead to the visitors seeing error messages, if the site is being tampered with while they try to access the site.
A blog about web development and Drupal.