Why do wizards, particularly pure-blood families like the Malfoys and LeStranges entrust their treasures, money and prized possessions to goblins? Bellatrix treats Griphook very badly, generally disrespecting him because of what he is, demonstrating the pure-blood wizard attitude to other magical beings. They don't like, respect or trust them. It is mentioned that there have been several goblin rebellions. If a wizard wanted to set up a Gringotts rival they would probably be pretty successful (shouldn't protecting objects be fairly easy given the sorts of spells we've seen). Is there are reason, beyond 'Gringotts works' that the whole wizarding community trusts them?
The Harry Potter Wiki page on Goblins has the following to say about them:
[They] are adept metalsmiths notable for their silverwork; they even mint coins for wizarding currency. Due to their skills with money and finances, they control the wizarding economy to a large extent and run Gringotts Wizarding Bank.
We also know that Gringotts is actually a Goblin bank:
[Gringotts] is owned and operated by goblins. It was created by a goblin called Gringott,
Furthermore, this article goes on to say that Gringotts was established back in the 15th century.
So, considering that Goblins are responsible for creating the money in the first place and then have established an effectively monopoly over the wizarding economy, it seems that the Wizards don't really have any choice. It would seem that goblins are probably better at finances than wizards themselves are, so they have come to rely upon them. Basically the wizards don't have a choice but to trust the goblins!
It is true that there is quite a bit of tension between the goblins and the wizards, especially that wizards treat goblins as inferior beings, but although wizards don't openly acknowledge this that I can find, it seems that by using Gringotts wizards are implicitly conceding that goblins are very effective in the finance sector.
Another important point to raise is that goblins do have their own magic, so although it is true a wizard could establish a particularly safe bank, we shouldn't underestimate the power of goblins. Consider the following extract:
goblins conceal the secrets of their own magic from wizards. Their weaponry and armour are nearly indestructible when created and have their own kinds of magical properties
So, although we don't know for sure exactly what powers goblins have, we do know that if they can make weaponry and armour that is "nearly indestructible" and can have magical properties, they'd make an excellent choice for creating a bank that needed to be impenetrable.
The short answer - because they provide useful services that are beneficial for both sides.
If we take a look at our history - the first banks in Europe were created and operated by jews around the 15th century. Jews were greatly mistrusted by the christian majority in Europe at that time with this distrust becoming a hate or open violence on several occasions.
Same goes for goblins - the goblin-wizard relations were cold at best during most of the time and there were several wars between them.
So it is possible that JKR took the idea about Gringotts being operated by goblins from the actual history of banking in Europe.
As a side note: Gringotts is not much of a bank. It acts as a safe storage for money and valuables and as monetary regulator. Still it does not (or at least we don't see) perform any activities like loan giving or having fiscal instruments. Of course we might not see it because it is not relevant for the story.