Being up front during fighting can sometimes be needed.
(For a Brigade commander it is very much part of the job . For a CSA Division commander (or union corp commander) I can understand there can be need of it in a few cases. But above that in the CSA army and you are pretty much failing in your duty)
And being there during periods of no combat is logical to do...
But what Jackson did was just stupid.
Scouting like that after dark is something you tell your engineer officers and staff officers to do.
And he was not only close to the front lines, he passed beyond his own lines and then even more stupid did not return the same way he came. Had he done so the unit there could have been told to expect him to return...
Iam no Jackson fanboy, but he would have helped the CSA cause better by letting his junior officers do their jobs...
Lee did a good deal of scouting in Mexico way beyond friendly lines for General Scott... exactly the way to use young (expendable) staff officers.