The Union had the high ground.
As I recall, they had the high ground and enough time to have entrenched themselves and their weapons effectively before they were attacked. Frontal assaults on entrenched positions have been at least a risky idea, and often a bad idea, since at least early July, 1863.