Sometimes, managers have to act fast to fill a position. It’s reasonable to let someone take the job temporarily. If she does well, it's perfectly acceptable to use that performance as a reason to offer the job permanently.
Recent case: O.B. Brooks, a black man, sued when he was not given an opportunity to apply for a promotion. Instead, a woman who had volunteered for a temporary assignment was chosen. Brooks said she wasn’t as well qualified as he.
But the employer said the woman had proven herself while doing the job on a temporary basis. The court said that was a legitimate reason to prefer her over Brooks. Since he couldn’t show that the company’s explanation was pretext for discrimination, he lost the case. (Brooks v. South Plains Association of Governments, No. 10-10616, 5th Cir., 2011)