Maybe it's just me, but I have rarely seen any reference to how historians determine written ancient fiction from non fiction, apart from the obvious myths (Greek Gods, for example).
How do we know that what we have as reference is not fiction, fantasy or artistic expression?
What about ancient cultures performing rituals for pure entertainment rather than religion, like how modern culture has massive non religious events like Burning Man or Coachella?
What if certain events are just stories written with a political or religious agenda, and never actually occurred?
What about motivations to like parody or humor?
You've keyed onto a very important historical question, however the question your asking is somewhat flawed. We don't assume that historical artefacts are accurate representations of reality. In fact, almost no historical artefacts (In my field, Near Eastern history) would be considered "objectively solved".
The role of historians and archaeologists is to provide insight into what objects *might* have been used for. This is done in a number of ways, including things such as political and religious agendas. Take this assessment that I wrote on a portion of the Old Testament, for example:
The worship of Yahweh as the only God is the primary fundamental belief of Israelite monotheism. Several passages in the Hebrew Bible outline this belief: “There is none else beside him” and “Ye shall not fear other gods”. In Israelite places of worship, no evidence of the worship of other gods has been found archaeologically. Several temples used for the worship of other gods were repurposed to be dedicated to Yahweh. Despite the high level of monotheistic integration in the public sphere, numerous cult stands, figurines and altars dedicated to various other deities have been discovered in domestic contexts throughout Ancient Israel. Canaanite iconography and cult objects continued to be used immediately prior to, and during the United Monarchy.
So what does this all mean? It means that, when historians and archaeologists are able to identify a series of objects/information that is relevant to the topic, it is possible to discern a more accurate understanding of a given source. If all that a historian is able to use is the source itself, it will be far less accurate. We are also able to employ what we know about the beliefs and practices of any given group. In the case above, it is clear that the Biblical text is not a wholly accurate representation of Israelite religious practices, rather that it was a political text using religion as a means of unification.
Just because a historian/archaeologist says that an object is used for x purpose, doesn't mean that it was. It means that the evidence available to them, along with their personal biases, suggests that it was.
I hope that helped. If you have any further questions, please do ask.