The PS2 had a very special architecture with many processors and units working in parallel, so it's more complex to emulate than the Dreamcast. It's also more powerful than the Dreamcast. The Gamecube architecture was simpler and closer to the Dreamcast but the hardware was far more powerful.
Sure, but the Dreamcast released in 1998 (in Japan), PS2 in 2000 and the Gamecube in 2001. So the Dreamcast hardware was older compared to later consoles.
While the PS2 had a much faster GPU and CPU (295MHz/5,5GFLOPS vs. 200MHz/1,4GFLOPS) the hardware mix of the Dreamcast appears to be tuned for real-life use. Games on the Dreamcast loaded textures directly into VRAM and texture compression made this easy.
The PS2 only had 4MB VRAM and worse texture compression. The textures of the game could be cached into the regular RAM but will put a strain on the (better available) bandwidth between CPU<->GPU. So to get a good looking game required a good software architecture and hardware knowledge. I think this made early PS2 games look worse compared to the older Dreamcast as they sometimes only used the 4MB VRAM.
The hardware SSAA in the Dreamcast also made it cost-effective to use anti-aliasing which made the graphics look less jaggy.
The SuperH-4 was easier to migrate to for developers familiar with the Sega platform (32X & Saturn used the SH2) compared to the more complex but faster Emotion Engine in the PS2 making it easier for developers to have good performing games early in the life of th Dreamcast. Sonic Adventure 1 and Shenmue were also developed on the Saturn first and development was migrated to the Dreamcast.
So I think looking back it's obvious the more modern consoles looked better, although I distictly remember release games of the PS2 weren't always that impressive compared to Dreamcast ones. Keep in mind that the Dreamcast hardware was competitive if not faster compared to PC hardware from 1998. The hardware was impressive in 1998 and 1999 and could compete with the PS2 in head-to-head graphics comparisons (especially in early games).
It might be that the console was killed pretty early which makes the nostalgia factor higher. We are left to wonder if we would have been playing Half-Life (which was leaked) and Halo on the Dreamcast instead, list of those games:
https://www.unseen64.net/category/sega/dreamcast/