Before migrating to Lemmy, I decided to request a copy of the data Reddit has on me.
To my surprise, the export includes a file ip_logs.csv
with a list of all IP addresses that I used to connect to Reddit for the last 3-4 months!!
That seems quite unnecessary.
I imagine they use it to keep track of alts and ban evasion, not surprising to me and you should probably assume that any site you visit will store your IP forever.