Important is that history paintings are "narrative", that means they want to tell something. Therefore it is crucial that the contemplator of a painting already knows the story so that he can understand the signs and symbols. The artist gives only a new interpretation of a well known story.
Because the artist and his audience are dependant of that common knowledge history painting was long dominated by religious subjects. Later when with the Renaissance Greek and Roman mythology became better known, paintings with these topics became popular. But still nearly nobody painted medieval heroes or battles, just for the simple reason that theses were not known at all.
But even when historical subjects (in a modern understanding) were painted they were normally taken from literature. Cäsar, Richard III were known because of Shakespeare and not from history books. Medieval Italy was known because of Dante. Later national heroes like Joan of Arc or William Tell could only become subjects of art because they were already known by literature.
It was then in the 19th century when history became a science with the pretension of objectivity, that some started to make a difference between history, religious and mythological paintings. But despite that history painting improved in many historical details like costumes and weapons it continued idealizing and romanticizing, in short it continued telling stories.


Its still a story only in better costumes!