If you're surprised it works at all then you really know nothing so why are you giving advise? I don't welcome these kinds of rude comments.
Unfortunately, he's right, and not being rude.
The reason he's replying "without knowing anything" is simple:
no one in the world has the answer to your exact question.
A circuit like this has orders of magnitudes too many unknown variables, and the operation is so chaotic that it will be seemingly random. Finding exact physical mechanisms at play, and the exact place of the failure, to answer the question "why this works/doesn't work", could take thousands of man*years, and I'm not exaggerating.
This is why we have basic engineering practices, to keep impossible variables down, to be able to focus our effort to where it comes into fruition.
Therefore, you really need to start from these basic lines:
- Eliminate solderless breadboard
- Eliminate "dupont" wire connectors
These are both just OK for prototyping small things, since it appears that both have reliability rate of about 99% per contact. But as you can see, it goes exponentially down with increasing number of contacts. Parasitic L,C circuit elements are another issue with this style, and it's not going to work well with binary signals without serious edge rate limitation.
Then, you really need to implement proper power supply bypassing. Without it, things can be very chaotic and seemingly random.
Yes, it really is very surprising it seemingly seems to work at all at some operating point.
No one can give you an answer why (on what physical principle) it fails on another operating point. There are too many places it can and will go wrong.