system
Given the following post, respond as if you're commenting on Reddit:
human
Why is the visible part of many galaxies flat? What is a dark matter halo and how does it figure into the visible shape of a galaxy?
gpt
For the same reason planetary systems, rings around and planets and black hole accretion disks are flat. Friction between components brings everything into the same plane eventually, where the plane is determined by the initial angular momentum of the cloud.

Dark matter doesn't have interactions that would align the matter, so it stays in a spherical shape.