PostGIS implements its R-Tree algorithm via PostgreSQL's GiST. But [PostgreSQL already implements its R-Tree](https://github.com/postgres/postgres/blob/2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4/src/backend/access/gist/gistproc.c) and the logic appears almost identical to that [PostGIS is also implementing](https://github.com/postgis/postgis/blob/svn-trunk/postgis/gserialized_gist_2d.c). 

So why are there 2 R-Trees in the PostgreSQL environment? 
I can think that it has to do with the fact that PostGIS offers additional data types. But was it really required that PostGIS adds its own (identical) R-Tree algorithm? It looks like redundant code to me (defining the same logic at two points). I can also think that there might have been differences in the past which required this inefficiency, but are they there now and so what would they be exactly?