At some early stage in the flight, why will commercial pilots announce the cruising altitude of the flight?
Passengers like information and even if some do not, it isn't much an inconvenience to hear it anyway. That information is a matter of tradition as far as I can tell. It is written nowhere in my manuals what is to be said in the boarding PA except some general guidelines on how to conduct yourself on the PA system. PA announcements you've heard have the cruising altitude, and the captain showing a new first officer how to do the boarding announcement will include that information. That first officer will go on to include the cruise altitude and when he is a captain he'll pass it along to his first officers.
If you took a look at every pilot individually you'll find that the vast majority of each pilots boarding announcements are exactly the same (aside from things that vary like the specific cruise altitude and weather information). After saying the announcement a few times you settle into a routine and it perpetuates.