13 years of development since the last release. Hope the last mile is not excruciating bug fixes.
(Edit: As the comment below points out, this happened to Windows Vista. There are plenty more examples though - Metroid Prime 4 was even announced by Nintendo, before being completely scrapped and rebuilt for another 6 years, finally coming out this year.)
But making prototypes and throwing them away is expected. It's not like white knuckling 13 year old designs is a smart idea either.
The reality is almost certainly that GTA Online took a lot of the focus for many years.