Team Fortress 2's source code is a prime example of what programmers call 'spaghetti code', a term used to describe tangled source code that is difficult to maintain and unravel. Even though that's not a legitimate dev note, it is true that it is still an unsolved mystery as to why that coconut is there and who put it there, and it isn't too much of a reach to assume that this left the developers quite puzzled upon discovering that it couldn't be deleted.
While the dev note isn't real, being just a joke Reddit comment from user u/Bucketfullabiscuits, the coconut JPG as well as the stipulations that come with deleting it, very much are. RELATED: The Crate Depression Of 2019: Valve Responds To The Unusual Hat Glitch