It is called a "sacrifice" fly because the batter presumably intends to allow a teammate to score a run, while sacrificing his own ability to do so. Sacrifice flies are traditionally recorded in box scores with the designation "SF".
The purpose of not counting a sacrifice fly as an at-bat is to avoid penalizing hitters for a successful action. The sacrifice fly is one of two instances in baseball where a batter is not charged with a time at bat after putting a ball in play; the other is the sacrifice hit (also known as a sacrifice bunt). But, while a sacrifice fly doesn't affect a player's batting average, it counts as a plate appearance, thus lowering his on-base percentage, and a player on a hitting streak will have the hit streak end if he has no official at-bats but has a sacrifice fly.
The reason for this is that the sacrifice fly, unlike the sacrifice bunt, is not considered a tactical maneuver (players don't try to hit a fly ball to advance a runner). Unlike a sacrifice bunt, which may be scored if a runner advances from any base to any base, a sacrifice fly is only credited if a runner scores on the play. Therefore, when a runner on first or second base tags on a fly ball and advances no further than third base, no sacrifice is given and the batter is charged with an at-bat. Also, if a runner tags and advances from second base (or, theoretically, from first base) all the way to home and scores (without an intervening error) the batter is credited with a sacrifice fly, as well as a second RBI if a runner on third also scores. At the professional level this will only typically occur in unusual circumstances that prevent the defense from making an immediate throw back to the infield, such as an outfielder colliding with the wall while making a catch on the warning track.
The sacrifice fly is credited even if another runner is put out so long as the run scores. The sacrifice fly is credited on a dropped ball even if another runner is forced out by reason of the batter becoming a runner.