Because test2 is not null-teminated char array. You got your output because you got lucky and nothing has crashed.
test1 array contains five characters: {'1', '2', '3', '4', '\0'} and is a proper nul-terminated string (\0 as last character) required by %s format specifier.