Academic timetabling is a notoriously difficult problem. Professors have several classes to teach, students have several classes to attend. There are restrictions related to classroom sizes, specific equipment (e.g. computer labs). Some professors may have individual restrictions, e.g. can only teach on specific days or hours due to other commitments.
Normally, Professors do not decide their own timetables, but submit their preferences to the Timetabling Office, which then generates a timetable for everyone. Students can also try to submit their requests, but usually as a groups (cohorts), not individually. If you are not happy with your timetable, it is definitely worth trying to change it, but bear in mind that it may not be easy.
However, if you class is scheduled up until 9pm, which is significantly beyond the core hours, you actually have a much better chance of having this class rescheduled, particularly if any of other students attending the same late class have caring responsibilities. Your Student Rep / Student Union Rep / Athena Swan Rep (in the UK) might be able to help you with the process.