There's a mental aspect (chalk = business time) but it's not a placebo. Have someone deadlift with a particular grip with and without chalk, and they'll lift more with the chalk, no question. It helps grip.
Can anything literally be only part placebo? obviously hyperbole, but anyone who has stuck their hand in a chalk bag knows how comforting it is in spite of it being the 7th time on that same rest hold.
On Chamonix-area granite, chalk is essential for me. Makes a huge difference. Definitely depends on the rock and the amount of sweat your hands produce.
When I was a math grad student, most of the other grad students hated getting chalk on their hands because it dried their skin out. Whereas I'd grab extra chalk from the board, and rub it over my hands to keep them dry.
As someone whose best day climbing was a 5.6 route on Yosemite's Cathedral Peak with a guide, I will add that one purpose of chalk might well be for guides to mark where the holds are for their clients.