I agree with you but the problem is that ATS categories are not managed by ATS. They are managed by Joomla's own com_categories component. Unfortunately and to the best of my knowledge com_categories does not let you prevent category deletion when it contains items. The reason behind this is that you cannot tell com_categories which table contains the "items" and which column of the table is the category key. com_categories can only do that for its own categories, i.e. categories containing com_content items.
You can see that com_categories exhibits the same behavior even for core Joomla! components, such as Banners. Create a banners category, put some banners in it and then go to Banners, Categories and delete it. It's gone right away, no questions asked...
The question you may have now is "if com_categories is so bad why don't you guys use your own code". There are two reasons.
First, if you want to use Joomla! ACLs to define who has what privileges on a category you need asset tracking. Due to the dated asset tracking architecture in Joomla! the only way to do it supporting a wide variety of Joomla! versions AND make it forwards compatible is using com_categories. In other words, if we didn't use com_categories the access control in the ticket system would break randomly with newer Joomla! releases, we wouldn't be able to even upgrade our site (major security issue) and we'd have to drop support for old versions of Joomla! as soon as a new version came out. All of that is a nightmare.
The other reason is that our users wanted integration with Joomla! Tags. Unfortunately that's a piece of bad Joomla! architecture I personally opposed in 2011-2012 but nobody wanted to heed my advice. It works in an unnecessarily covoluted way which involves having mirror copies of data in the UCM tables. Trying to implement tagging on your own objects is notoriously hard. When we were writing ATS our framework, FOF, didn't support tags properly. So, no com_categories, no tags, people are angry.
As I said, I do agree with you but non-empty category deletion would introduce such bigger issues that I don't really want to even think about touching it. Just be careful not to delete categories with tickets, I guess.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!