If a world championship-starved Ferrari take a gamble on Hamilton, then that demonstrates a denial of the problems that are currently being faced by the team. From where I stand, these are an absence of both focused leadership and a clear sense direction. They already have two good racers, although Leclerc seems to have lost some confidence in himself, of late.
Any forward thinking team that is throwing work in the direction of an aging-out world champion should be looking for someone who can guide the development of their car, and mentor any younger drivers in their fold. Alonso is an asset in that regard, and is clearly having the time of his life. It's what you would wish for any beloved world champion - that Indian Summer.
Hamilton is a competent driver who, for almost the entirety of his career, has had cars designed around his needs. I have never got the sense of him being down there in the garages with his sleeves rolled up. I don't think he has it in him to forge a meaningful relationship with the boys and girls in the backroom, who he continually denigrates in public. He far is too arrogant to step into the big brother role as far as a teammate is concerned. Russell has more or less succeeded in spite of him.