Because you’re running hugo server it overrides baseURL to be localhost:1313 - because that’s where your test server is running. If it returned https://anexample.org then links on your site wouldn’t work whilst you’re.
If you build your site (just run hugo) then the html files that get output in the public folder will have the BaseURL value from your config.toml in them.