That's a great sentiment but that is not what happened. Or (at minimum), it was massively underfunded.
With regards to CalPERS specifically, it was covered here two weeks ago: https://news.ycombinator.com/item?id=13287078 and from that article:
"For every $100 the city paid a police officer in 2016, it had to pay an additional $71 to CalPERS to fund payments to current and future retirees."