On the origin of cell walls and of lattice misorientations during deformation