As far as I know, the replicator reads files from the computer library and based on that pattern it creates the object or food. If it is just materializing objects to the molecule based on that pattern, am I correct in my assumption that if want to replicate say three apples, they would be absolutely identical. Or does the device add some variance? Or are there any limitations which would not make everything identical? And yet, if it introduces some variance, how trustworthy will it be when creating more sensitive items?
The files from the library may contain either a copy of an apple, copies of multiple apples, or instructions on how to generate random apples. So it's readily possible that replicators could produce random apples.
After all, if you were designing a replicator which makes food for people, you wouldn't want to produce the exact same meal every time as most people would get bored. Built in variety would be a useful feature.
It's probably possible to ask the replicator to produce identical items but it's most likely that the default setting would be to randomise.
I believe the food the crew members ask the replicator is their own version of the dish. They program a version of it they way they like it, changing taste, adding spices and everything at their own taste and then they set it as their defult preferred option.
So that is also why there is an attendant at the ship bar, her/his role is to serve the crew but also to create a particular version of the drinks and foods and add some variety.
Foor example, Picard's tea.
The Earl Grey he uses his his own recipe of it. And the definition of hot is his own definition of hot. He may have guest and they may want it warm, so he could just keep his own recipy of Earl Grey but have it warm instead... and so on...
It would depend on where and who was replicated it. On a ship, They would keep only one pattern as disk space would be a valuable resource (They are ships of exploration and science, no?). The counter point to this is that replicators don't replicated exact copies of anything. Like making a copy of anything, there is some data lost or change in the reproduction of the stored item. Also, Federation replicators transpose things into the foodstuffs that come out of them, like nutrients. One could theorize that the nutrients could change based on the recipient's needs, making them different. What it would all come down to is if this affects the actual taste of said foodstuffs, which the lore points to both directions. It would also make scense for planet side bases and more civilen locations to have a wider variety of an object, as space isn't as much an issue.