check out this https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170
first, it says that UCRT is linked dynamically. second, there are 2 more libraries that compose the CRT
so, ill try to guess:
without entry, builtins (default libs) are on, initialization code injected, everything builds fine.
no builtins, memcpy() is declared, but UCRT doesnt have memcpy() so linker skips attaching it and fails.
no builtins, memcpy_s() is implemented in UCRT, linker attaches UCRT that is special default lib that requires initialization so it attaches other libraries (msvcrt, vcruntime) that has memcpy() so the thing, again, builds fine.