History is written by the writers; who may, or may not, be on the side of the victors. You might want to check out this collection of past threads on the topic, but I'm a fan in particular of /u/Tiako's answers to the topic:
I would be willing to give an example from my own (obscure) field if you want of how history is not necessarily written by the victors, if you're interested in that.
You already got some great answers, but I can shortly give the perspective from archaeology.
To some degree, archaeology is useful because it can examine the histories of people who don't have their own written history as long as they left something behind. This has been used successfully in a wide variety of situations, but for example, archaeological research on plantations in the southern US has been very helpful in understanding what the life of slaves was like when otherwise the majority of sources are written from the perspective of slave owners.
However, the discipline of archaeology as a whole has been a victim of this proposition about the victors, at least to a degree. Especially in the 19th century and early 20th century, archaeology was often used to justify the colonization of parts of Africa and other parts of the world by denying that the indigenous people of that area had any history. Of course, more recent archaeology has demonstrated how that is history very much influenced by a particular political agenda, but the modes of analysis still linger with us today. Whenever you see a portrayal of Native Americans, for instance, as peaceful hunter-gatherers in tune with nature, that is absolutely the legacy of the colonial bias in archaeology (and anthropology and history as well). There tend to be a certain set of ideas about non-Europeans that recur again and again, so as long as you are aware of these "tropes", it is easier to avoid them in your own research.