Joseph did this not because of any "admiration for General Meiras's courageous performance on the battlefield," but because Meiras was incompetent.
If he returns to Austria and is reused, then next time on the battlefield he will deliver great gifts to France.
This is more advantageous than detaining him and letting more capable officers command the Austrian Army.
At the same time, it can also show France's "respect for the spirit of knightly tradition," which means that the nobles have the right to use ransom to regain their freedom.
Firstly, it can undermine the determination of enemy generals to fight to the death in future wars.
Secondly, if an important French general is captured, he can be ransomed back in this way.
Of course, if it were to capture figures like the Duke of Wellington, Archduke Karl, or Kutuzov, Joseph would not hesitate to throw "knightly spirit" into the trash.
Alexandria.