When Drupal 7 was first released, drupal_alter() accepted a maximum of two context parameters that could be passed along to hook implementations (in addition to the primary data parameter). However, to allow for the fact that some older code was still attempting to pass additional parameters along (including invocations of hook_file_download_access_alter() in Drupal core), this restriction has been relaxed in Drupal 7.22 so that an additional, third context parameter can be passed. This means that hooks such as hook_file_download_access_alter() will now begin working as designed.
The third context parameter is being introduced to Drupal 7 for backwards-compatibility reasons only and should be considered immediately deprecated; do not use it for new Drupal 7 code. It is removed in Drupal 8, which will only accept a maximum of two context parameters.
If you have more than two context parameters that need to be passed to alter hooks, the following method is recommended in Drupal 7 and required in Drupal 8:
<?php
// There are three pieces of contextual information ($entity, $field, and
// $instance) that we want to pass to implementations of
// hook_mymodule_data_alter(), so put two of them together in the last
// context parameter.
$context = array(
'field' => $field,
'instance' => $instance,
);
drupal_alter('mymodule_data', $data, $entity, $context);
?>