MacBook Pro suddenly does not boot and acts very strange
It is hard to tell in cases like this as the hardware test and Disk Utility don't always find hardware or disk errors.

However that the system can boot and run diagnostics bodes well for the hardware in the system. It sounds like it is possibly a damaged macOS install. I would be inclined to reinstall macOS right over top of what you already have there. Normally an OS install will not wipe any of your data. But, as always, verify you have a good working backup before proceeding.

If it still acts wonky after an OS reinstall I would say that you possibly have an issue with the HD/SSD and a 3rd party disk utility might be able to either tell you what is wrong and/or fix it. Failing that a visit to the Genius Bar may be in order.