Yeah,that's kind of the point of salary for the most part.The employer guarantees X number of dollars per week with expectation that they will get at least as much as , and quite often more than, X dollars worth value out of the employee every week.The advantage is a reliable income since pay is not tied to hours worked, which can vary depending on the amount of work available.
Hourly usually offers less pay with the expectation that more often than not you will be done with the work day on or before time unless there are extraordinary cimcumstances in order to avoid paying out time and a half.It also offers the benefit of the employer not being allowed to pester the employee with work matters when the employee is off the clock, whereas salaried employees are often considered to be "always on the clock" when it comes to availability.