Answer:
Just chance - you may call it God.
Grant was a modest and self-effacing man, who did not put himself forward for promotion. But his good performance was noticed by John Fremont, a popular figure of the frontier who did not last long as a General, but promoted Grant to Brigadier before he lost his job.