Or was it just fashionable to include them in the art work?
Can you provide specific examples that interest you? I ask not to be difficult, but because there is significant variation in the cultural and intellectual origins of various painting styles, and individual painters would have made decisions about what to include based on their own circumstances, training, etc.