Why does SQL Server Backupset table goes back a few months, but Agent Logs go back further? I ran this script looking at the history of my backups for the past month.

select * from msdb.dbo.backupset order by backup_start_date


No problem, but if I want to go back to Jan 2020, there are no records.

So why does the Agent Log, with Log Type = 'DATABASE' go back further?

Thanks
The Agent Log is limited by the number of entries, not by a date. The default is 1000 rows, with 100 rows per job. You can see this via Right-click SQL Server Agent in SSMS -> Properties -> History.

So, if you've had fewer than that number of events since January, the history will go back further. You can change that limit in the dialog noted above.

Many DBAs will configure a job to purge backup history on a rolling month or two month basis, sometimes coordinated with how long backups are kept on local storage.