Say the true diameter is the path from to . When you BFS from a random node , you will reach some farthest node .
If is not on the diameter path, then there is a longer path from through the diameter to one of its endpoints. Contradiction: would not be farthest.
So must be on or reachable-to an endpoint of the diameter. When you BFS from , you will reach the other endpoint, giving you the full diameter.
This is not a full formal proof, but it is the core intuition.