Just a little something to add here, I believe they started out because trolley companies were used primarily for weekday commuters and they wanted some business on the weekends, hence why they would build these at the ends of their lines. So they could rake in profit not only from the park itself but from their trolley line.
Interstingly enough, there also doesn't seem to necessarily be a "typical" life after trolley park situation as there have been some pretty diverse things to happen to them. Kennywood and Dorney Park both boomed into mid-sized regional parks with large steel coasters, Quassy and Waldameer stayed small but have modern additions alongside nostalgic ones, Camden Park is falling apart.
So these days it's often associated with an older park with classic rides, but there really is no "typical" trolley park anymore as they've all aged so differently.