One of the greatest ways to express our worship to God is by our acts of love towards Him hence, in our great reverence for God, we seek to build for Him the finest of temples. Such act can be seen in 2 Samuel 7: 1-12 when King David feels the great urge to build a house for the LORD made of the finest materials at that time. This urge grew as a result of his love for God. In the same way, the Church which is made up of the children of God expresses its love for God.
Catholics believe so much in ecclesiastical art due to the graceful effects it has on all who behold it. This definitely explains how Paul Claudel, the French poet, playwright and diplomat was reconverted to the faith during a visit to Notre Dame Cathedral in Paris. The wonderful effects of the grace-filled beauty of the building and of the liturgy was so powerful that it connected his mind to the radiance of God and he was able to feel the heavenly presence of God.
In 2 Samuel 7:13, God commanded the Jews to build a radiant temple in Jerusalem. So, we are obligated to do the same. Even in the medieval period, common peasants contributed towards building and sustaining the Temple of God according to their skills and abilities. Bricklayers volunteered to lay stones and bricks, painters volunteered to paint the Church, people contributed woods and other materials while carpenters did the woodworks. In this way, the Churches were erected in the finest structures having been a product of heart-lifting love for God.
The building of fancy Churches in no way stops people from contributing for the poor as all faithful who genuinely feel the need to build for God naturally have greater zeal to help the poor.