Aria D. answered 21d
Violinist and Composer with Competition and Soloist Experience
The reason is because a fifth:
-fits nicely in the hand. (Except for on double bass, which is why it's tuned in fourths)
-is the "purest" interval that actually has two different note names in it according to the tuning system we predominantly use, Pythagorean tuning. (Yes, that Pythagoras)
The degree to which the violin and its relatives were consciously designed such that these facts both reinforced each other is certainly very high: it's almost certain that they designed these instruments from the start to be able to fit that interval into the hand.
Interestingly, because we tune our fifths in an exact frequency ratio of 3 to 2 (where the top note is exactly 1.5 times the frequency of the lower note), we are actually almost always out of tune with pianos, which use equal tempered tuning. The difference between an equal tempered fifth and a Pythagorean fifth is only about one-fiftieth of a half step, so it's barely noticeable, but that does mean on a violin your E string will be one-fiftieth of a half step sharper than the piano's E and your D string will be one-fiftieth of a half step flatter than the piano's D. Additionally, your G string will be two-fiftieths of a half step flatter than the piano's G. Fun fact - that's why we only tune to the piano's A and not all the other strings, and it's also why we prefer to tune all the strings relative to the A string rather than using a tuner for each one as we mature as players.
The double bass is not quite a true sibling of the violin, being more related to its ancestor, the viol / viola da gamba. As such it didn't feel the need to preserve the exact tuning system that the violin, viola and cello have, where they are tuned in fifths. Also, because it's so large the hand cannot quite span a fifth anymore, it tunes in fourths instead, which are just fifths turned upside down. Perfect fourths have a ratio of 4 to 3, again considered a very pure interval in Pythagorean tuning systems.