I think they are meant for people to believe they do something so they'll feel better and wait. I used to walk a lot and encounter lots of crosswalk with buttons and I got used to how fast I should go in order to catch green every time and I could predict when the next crosswalk was going to turn green. If they truly worked then they should have been out of sync. I never pushed the buttons and I saw the light turning green even though no one pushed the button, if the buttons worked then why would the light turn green?
I also asked gemini about this and he said I'm not going insane, strange because I never mentioned if I was insane or not, but good to know I'm not.
Maybe some buttons work and other don't depending on where it is?
Where I live, the old ones do something, but the new ones don't. Decades ago, most places didn't have complex traffic networks or need them. Individual areas and sections adapted to the needs of the local population. Today, we view traffic design from more of a systemic lens. We try to route cars through specific thoroughfares to optimize traffic times, and we regulate red lights to accomodate the flows of traffic.