It is a bit of a mystery, but the Pope seems to favour small factions, poor factions and factions with a lot of catholics in their borders when handing out cash. Excommunicated factions get nothing, but once the excommunication is lifted, the Pope seems to forget their past behavior and hand out money as freely as ever. The money comes out of the Pope's own pocket, so if he is poor there won't be any gifts.

However, sometimes the Pope gives money to a faction that is very rich already. Perhaps there is a threshold value of the Papal treasury, above which he starts giving money away. This would prevent the Papacy from getting too rich and too powerful.