Iirc, Sanji was the one who made mention of the Devil Fruit Encyclopedia, thats how he knew which fruit he wanted to eat(suke-suke no mi). Maybe I'm alone but I always thought about that book as a fan of the series, how cool would it be for the crew to have an encyclopedia of Devil Fruits(come to think of it, maybe BB has a copy, my theory-write that down)! I never really gave it much thought, except that it was something I wanted the crew to encounter/own. Now that Sanji is wanted Alive only, many theories have been proposed suggesting that Sanji was once a WN, and I have to say this little fact (Sanji had knowledge of this book) solidifies my opinion that this is true.
Facts;
Sanji was 9 when he was on the cruise ship Zeff attacked.
Sanji refused eating leftover's from other's plates (very WN style, but yes a generally frowned on activity for many)
When He made his stand against Zeff's crew he talked down to them (something along the lines of "I'm not gonna let pirates kill me/I'll KILL you first")
He made mention of All Blue and his desire to find it.
Fast forward to Sanji at the Bariete-after Luffy's battle with Don Krieg, Sanji mentions the Devil Fruit Encyclopedia.
My idea;
We as readers and fans of OP have been over saturated with exposure to Devil Fruits, for us, its almost a given that anyone can have one and, in general, its not "omg, a devil fruit, ect ect" we've become numb in a way. BUT that is not the case for most people in the OP world, many still fear and do not understand Devil Fruits or their powers, generally speaking, most people are clueless about them (samurai from wano are a good example of this, as well as CP9 when Kaku and Khalifa had questions about them-to drive home that point, some of the best spies and killers in the world are dumbstruck when it comes to these fruits).
So how is it that a 9 year old boy not only knows about the fruits, but also knows that there is an encyclopedia and has chosen the fruit he wants (wanted*) to eat?
Its my impression that Sanji clearly had access to the encyclopedia, so much so that he picked out which one he wanted, but how?
Earlier I said I always thought of the Devil Fruit Encyclopedia as a cool item for the crew to find/own, i never put thought into the item itself as it would have to exist in the op universe, now that I have, I started to think...
Who COULD currently have it?
Simple answer; Marines, World Nobles, Vegapunk
Who created it?
Simple Answer; Vegapunk, using Marines as...scouts (?) To catalog different fruits over time.
What purpose would it serve?
Obvious answer; To tell which devil fruit possessed which power (pictures of said fruits, and possibly a list of individuals who have owned the fruit in the past (example; Mera-mera no mi, there would be a picture of the fruit, slight discription of powers given, list of current/former owners; Sabo-active, Portugas D Ace-deceased) you get the idea).
Lastly, why make it? Who has access to so many devil fruits that they would need to have an encyclopedia of them?
Hard answer; World Nobles. It was once mentioned that WNs would feed slaves fruits for their own entertainment. It stands to argue that they wouldn't just feed random fruits to slaves, WNs love power and control, they would, in my opinion, feed fruits to slaves just to witness the powers as a novelty. I doubt slaves would be fed powerful fruits in order to prevent escapes.
Long story short, this is how I see it;
Sanji was once a WN with access to the Devil Fruit Encyclopedia. Inspired by the Legend of All Blue decided to denounce his heritage and seek out a life to find it and aquire the suke-suke no mi. He was disingenuous to the idea of a WN's life, boring and mundane with no chance of excitement, no chance of really living. Finding purpose in repaying his debt to Zeff Sanji lived his days until Luffy came along.
Honestly i don't know why Sanji has not admitted this or remembered? But I'm sure Oda will provide us with an answer that makes us go,"Ah, ok...I'll buy thay." Whatever it might be.