At this point it is either just straight up Isekai magic, or maybe secret rogue worldbuilding AI.
The main thing I have to support the idea that it isn't just straight up magic is the fact that there were weirdly advanced pervy NPCs in the starting area's tavern during the night, so it is not like life-like things only started showing up after they crossed the portal in the starting dungeon. Not sure who would have created such an AI, maybe Otaku if it turns out he is some kind of secret genius, he just let Caleb work on the human-machine interfacing while he secretly worked on an AI program to generate any kind of fantasy world, Sami could then just be an NPC implanted with real world information.
Another thing to think about is that, at least in the starting area, it seems the daytime was fully synchronized with the real world, so if someone was working in a secret AI, making sure it would only be enabled during the night for testing purposes would be the smart thing to do, since none of the other programmers would be around to notice it.
I like the idea Bloep mentioned about the machine taking inspiration from its users when creating the world, but considering Emily's introduction doesn't seem to have changed anything, it is more likely it just used the CoC game as inspiration, maybe Ana might have installed it in one of the work computers the AI could have had access to.