Laika was the first living organism larger than a microbe to enter orbit via rocket.^(1) After the launch, there was a whole slew of ethical concerns surrounding the use of a dog for the purpose of testing the effect of space flight on non-human creatures.^(2) There were numerous reasons for sending Laika up before trying the same thing with a human^(3):
Sputnik II was a huge step forward from Sputnik I, the payload of the former was significantly larger that its predecessor and was mainly a staging flight for the eventual launch of a human into orbit.^(4) The Vostok I rocket was the same one used to launch Sputnik I, Sputnik II / Laika, and Yuri Gagarin into space the only thing that changed was the payload,^(5) as such adding the window to the passenger compartment carrying Laika wasn't so much done to benefit her, but rather to ensure that such technology would be practical for eventual use with human passengers.
In fact, rocket scientists anticipated the problems of adding a viewing portal to the cabin which you no doubt are able to imagine on your own and designed it as such that it was immune to exposure to the most intense heat and pressure-- for example by placing the portal at the rear of the vehicle.^(6)