I caught a Smeargle today following a photo bomb with my Lock-On / Focus Blast Registeel. The Smeargle I caught, to my surprise, knew Astonish / Focus Blast, not Lock-On. My suspicion is that Lock-On cannot be learnt by Smeargle, because Lock-On was introduced after Sketch.
My question is why did Smeargle learn Astonish? My guess is that it was a random move, but I cannot prove this nor find evidence online. None of the Pokemon I had used, caught or evolved recently knew that move.