Gunnery Sergeant Hartman really cared for private Lawrence. He knew how slow and soft and dim-witted Lawrence was, and that he would in all likelihood get himself and his fellow soldiers killed. Hartman did his best to give Lawrence an environment which would make him tough enough to survive. Hartman even shows pride in Lawrence later on at the rifle range and proclaims that the private is now "Born again hard!" The training just worked too well.
It's really Joker, not Lawrence, who is unfit for service. Joker finds a clearly unbalanced man in the head loading a rifle (a violation of at least three regulations), and makes no attempt to either disarm him (the rifle was empty and leaning against a wall when Joker finds him) or alert the MPs to someone loading a rifle in the head, which results in a DI getting killed and a recruit killing himself.