It was purpose of that visit. Putin and polish President Mr Kaczynski supposed to be there. To commemorate polish POWs killed by NKVD during WW2.
Putin was not going to attend this ceremony. Tusk and Putin attended an ceremony a few days earlier (a first for a soviet/Russian premier).
This commemoration was for Poles only, which is why the President was attending it as he wasn't invited to the Russian/Polish ceremony due his anti-Russian attitude.