There is a carriage return (CR) character at the end of var3 content. After it gets printed without immediately following newline character (line feed, LF), the remaining part of the line is printed from the left edge, overwriting the already printed beginning of the line.
Unix standard of line ending is LF, not CR LF.
Rewrite the script line where the variable is defined or use dos2unix on the file.