What was the purpose of this diagonal 2x2 along wall?
It was probably temporary bracing used during construction. It can be safely removed once the roof structure is complete and the walls have structural sheathing properly installed.