hello everyone

this is a question that i have hard to ask yet here goes -

1 - installed raspberry pi os on a 32g sd with out a desktop
2 - installed MATE and shorewall. copied over my shorewall configs
3 - added debian security and kali snapshot to the sources list and went through the steps to get the gpg keys working
4 - did an apt-get update, then an apt-get upgrade
5 - rebooted when it was done in
6 - once back into the gui, did an apt-get update and apt-get upgrade, hit n to look at the 'autoremove' apps
7 - apt autoremove
8 - then did the upgrade and rebooted
8 - once back into the gui did another update and upgrade, lot's more packages wanted to be upgrade already. told me at this
time that i had more things to 'autoremove', did a reboot
9 - wouldn't get back into a gui, wouldn't let me to to a vt, ctrl + alt + F1, tried a couple of other ones aslo
10 - pulled the power supply and the machine kept running

cat /etc/os-release -
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"

this is a raspberry pi 3 v 1.2
has an external hd plugged into one of the usb ports. this hd has a two wire system, data and power and power.
- the only power one is plugged into a usb charging block that's rated 5.3V :: 2.0 A
i unplugged the cord from the hd and left it plugged into the raspberry and the charging block and it shut down
rebooted, same thing as before, couldn't get into a gui or a vt
unplugged from the drive again and it kept running until i unplugged the usb from the raspberry, then it shutdown

this is really strange to me, so i'm curious what could be doing this.
the raspberry is the only computer that i have right now since my laptop recently burned out. so i'm using another sd
card with raspberry os/debian 64 to be able to get any into that some one might need from the other sd card. (have it
plugged into one of the usb ports with an adapter,

any ideas?