If it was an "inside the app" setting, then Uber did not behave.
> but the app should not have my location made available to it when I am not using it
Unfortunately, not how Android works. You can turn "location permission" on or off for individual apps, but if it is on for an app (and Uber's app likely demanded it be allowed "location permission" upon install) then if the global GPS is turned on, any app with "location permission" can ask the phone "where am I" at any time.
> but the app should not have my location made available to it when I am not using it
Unfortunately, not how Android works. You can turn "location permission" on or off for individual apps, but if it is on for an app (and Uber's app likely demanded it be allowed "location permission" upon install) then if the global GPS is turned on, any app with "location permission" can ask the phone "where am I" at any time.