Why were the soldiers and their girlfriends taking pictures of Misha and his friends in Milkweed?
Although there is no proof of the exact reasoning you ask for in your question, we can look at the episode in question to figure it out through context. This incident happens after Misha is already friends with Janina and they live in the Warsaw ghetto in Poland. On one particular evening (which happens to be the evening that Misha is helping Janina get rid of her lice), they notice one particular Nazi soldier (here generally called "Jackboots") holding a strange contraption. Misha (in his innocence) thinks the thing is a gun, but it is really a camera. The soldier snaps it in Misha's face, and then takes pictures of Janina. Janina is absolutely thrilled to be photographed. She dances and spins and asks for more. At one point, the soldier asks the two children to pose, and he stands behind them for a picture, making sure not to touch the two children. The children also notice that the soldier's girlfriend who is with him has white gloves on and doesn't touch anything either.
In answer to your question. it can be inferred that the Nazi soldier (one of the "Jackboots") and his girlfriend are out "for a stroll in the ghetto" as it says in the text. The Germans are not natives here and my guess is they find the locals quaint. It is evident from the narrative above that they also have little respect for the locals (as the soldier is quick to shoot the camera that Misha thinks is a gun) and believe the Jewish people in the ghetto are very dirty.