The reason that it’s next day is that for most banks, the process of doing an ACH transfer is to effectively SFTP a file with the amount to transfer and account details to the receiving bank, and they batch process them nightly.
Also, with this system, there is no difference between a direct deposit and direct withdrawal. One just has a negative transfer balance. So once you approve someone such as your employer to direct deposit they can also withdraw from your account with no warning.
It pains me that a system so shitty powers the world financial market... that’s what you get from monopolies.