The current Tanger-Ville was built for the opening of the high speed line around 2010. 400m platforms x 8 would not have fitted on the site in town, neither would the approach have been suitable (from memory, in the 1980s it was effectively unfenced running between the beach and the dual carriageway).
Although the original Tanger-Ville was near the old port entrance, that harbour is now the marina. It was far too cramped for growing vehicle traffic so RoRo ferries moved north to the new berths next to the breakwater. From the mid-2000s the new Tanger Med port, about 20 miles east, took over most freight and some RoRo. Tanger Med had a passenger train service at first but it ceased pretty rapidly due to lack of use.