What the shared endpoint must show
The idea seems simple, but it depends on exact alignment. Two rays can share an endpoint without being opposite. They only become opposite when the opening between them is a straight angle.
Opposite rays matter because they support later vocabulary such as straight angle, linear pair, and betweenness on a line. They are one of the first relationship ideas in line geometry.
If points A, O, and B lie in that order on one straight line, ray OA and ray OB are opposite rays. The shared endpoint O is essential, but the straight alignment is what completes the definition. Moving either outer point off the line breaks the relationship.
Because the two rays form a straight angle, their non-shared directions can be used to describe a line through O. This is why opposite rays appear in definitions of linear pairs and in diagrams where a segment continues straight through a point.