... why did they photograph the documents?
The police had the right to check the documents, but not to photograph them. Ukrainian legislation does not provide for the right of the police to photograph identity documents. The police can take a photo of your passport only if there are grounds to believe that you have committed or intend to commit an offence.