Two things are happening here:

1. fish's `alias` actually creates a function.
2. fish ships with a default history function already.

So when you write
```shell
alias history "PAGER='bat -l fish' history" 
```
what you actually have is the _recursive_ function
```shell
function history
  PAGER='bat -l fish' history $argv 
end
```

---

Some solutions:

1. use a different name for your alias
   ```shell
   alias hist 'PAGER="bat -l fish" history'
   ```

2. Don't `alias _old_history hist`, but copy it instead
   ```shell
   functions --copy history _old_history
   alias history 'PAGER="bat -l fish" _old_history'
   ```

3. If you don't care to keep fish's function, invoke the _builtin_ history command in your own function
   ```shell
   function history
     builtin history $argv | bat -l fish
   end
   ```

---

> why doesn't the builtin history support pager?

I assume the fish designers didn't think that was a core part of the history functionality. I assume they put the user-facing stuff in a function that users can override.

Here's the relevant snippet from the default history function:
```shell
        case search # search the interactive command history
            test -z "$search_mode"
            and set search_mode --contains

            if isatty stdout
                set -l pager (__fish_anypager)
                and isatty stdout
                or set pager cat

                # If the user hasn't preconfigured less with the $LESS environment variable,
                # we do so to have it behave like cat if output fits on one screen.
                if not set -qx LESS
                    set -x LESS --quit-if-one-screen
                    # Also set --no-init for less < v530, see #8157.
                    if type -q less; and test (less --version | string match -r 'less (\d+)')[2] -lt 530 2>/dev/null
                        set -x LESS $LESS --no-init
                    end
                end
                not set -qx LV # ask the pager lv not to strip colors
                and set -x LV -c

                builtin history search $search_mode $show_time $max_count $_flag_case_sensitive $_flag_reverse $_flag_null -- $argv | $pager
            else
                builtin history search $search_mode $show_time $max_count $_flag_case_sensitive $_flag_reverse $_flag_null -- $argv
            end
```