Depends on the situation, but keep in mind there's a company of stormtroopers inside that thing. I'm sure the rebels were scrambling to destroy it before they could deploy.
And the ground commander (?) is just doing what he thinks is best, sending in demolition experts; up to that point, the rebel speeders haven't been able to take out an AT-AT with their blasters.