So that this can be used to initiate downloads of the file.
Something like:
if($_GET['download'] !== null) {
  $type = 'application/octet-stream'
} else {
  switch ($file[count($file)-1]) {
    case 'mp3':
    $type = 'audio/mpeg';
    break;
    // All the other types...
  }
}The idea being that we can simply give the download url parameter and the MIME type will be broken to trigger the browser to download it instead of trying to play it.