When the categories of a bar chart have no inherent ordering, the bars in a bar chart should be ordered based on the numerical values, so that the biggest bars are on one side of the chart and the smallest ones on the other. This increases the legibility of the bar chart, and creates a nice ranking and a more pleasing design.
Unsorted and sorted bars. Source: Maarten Lambrechts, CC BY SA 4.0
When the categories do have an inherent ordering (like age classes, or values like “very bad”, “bad”, “neutral”, “good”, “very good”), the bars should be ordered according to this inherent ordering.