Depending on the state, they may be limited to almost exclusively those roles, or they might be equivalent to a full police department that also happens to have those roles. In LA, it's closer to the latter.
I mean, it makes sense having the distinction between the FBI and municipal police forces and state police forces when the state forces primarily police non-municipal areas like expressways and can provide some more mobile backup when there's a local crisis that exceeds a local force's ability to manage.
But I don't understand the logic of having so many overlapping police service organizations beyond that.
It seems that each entity starts out performing a specific function, but policing is important and we don't want them to just not enforce the law because it's "not their jurisdiction", so we'll just give them more jurisdiction... and the funding to match... and eventually you have 3-5 departments doing basically the same thing in basically the same area.
It's terrible. It leads to budget bloat and overpolicing, complicates oversight, and makes it harder for locals to manage police interactions because they're dealing with discordant department policies and ethos. (edit: It may be important to note that the police departments themselves seem to consider all of these things a feature, not a bug.)