Grays terminators on the LT&S are long-standing, but until relatively recent times the services starting and finishing there came from Upminster, via Ockendon. (Or Romford, if we go back to the 50s).
If I have my timeline right, it was the opening of Lakeside shopping centre and nearby housing development at Chafford Hundred that saw ‘via Ockendon’ services extended through to Southend Central, and in parallel the ‘via Rainham’ service was cut back to Grays, though there is timetable variety in the peak hours.
Also in the mix was the closure of the spur to Tilbury Riverside in the early 90s. In its later years, Riverside took some ‘branch’ services from Upminster, along with some trains from London via Rainham which reversed there before continuing to Pitsea and beyond.