A couple of reasons, why ennis walked in the middle of the road.....
1.....it was obviously a town with not too much vehicular traffic.
2.....He was feeling despondent, and really was in no mood to think of where he was walking.
3.....If he had got hit by a car, he wouldnt have cared, it would have put him out of the misery he was feeling.
4.....(and this is the real reason, I think)....by walking in the middle of the road, he knew Jack would be able to see him in his rear view mirror, and maybe he was hoping, that if he stayed in Jack's view, there was always a chance that Jack might turn around and come and get him. (OMG, I wish that is what happened)