My guess is that the postcards can be bought for people to send to their family/friends etc, or perhaps kept as a souvenir, and there is a donation box for people to leave their money in when the church is closed.
What public institution is housed in that structure?
Strażnica w Ustrzykach Górnych.
Border guard building in Ustrzyki Górne.