The pragmatic answer to your specific question is: because if ignorance was allowed as an excuse, everyone would use it when accused of any crime less obvious than the ones you mention, and it would be very hard for the prosecution to prove beyond a reasonable doubt that the accused knew the relevant law.
Ultimately I don’t think too much injustice results. By the time you are old enough to be prosecuted, you usually understand very well what is legal and what isn’t. You may not know precisely what crime you are committing, you may not know exactly what the sentence is, but you generally have a pretty fair idea what is going to cross the line.
And if you do fall foul of an offence so obscure that it is entirely credible that you did what you did in total ignorance that you were doing something wrong, you are able to bring that to the attention of the court in in mitigation of penalty and if you are believed, you might well get off with a slap on the wrist.
I suspect that your underlying question is: how do I find out about the law?
Human society is a complex thing, laws to circumscribe it are necessarily likewise, and legal drafting is not what it should be. Between those factors, the reality is that many would not find it easy to find what the law is on a particular point even armed with an internet connection and a library.
Additionally, much of the law in Australia is common law ie based on precedent. Particularly in the criminal sphere. In Queensland, we have codified our criminal law to a significant extent. You can find it here in the Criminal Code Act. However, there are other acts all over the place that create criminal offences in particular fields. And even the Criminal Code has been pored over by courts and lawyers and “interpreted” to such a degree that it is really only the skeleton that precedent fleshes out.
So even though legislation and a hotchpotch of other legal resources are available online, the most you can say is that they may contain an encapsulation of what you are looking for, but rarely with any certainty.
To really understand the law in any given area, you need an up to date textbook. On Queensland criminal law, you need Carter’s, any law library would have it. At a more basic level, I think there’s a Queensland Law Guide put out by Caxton Legal Service and other community legal organisations (one of my partners did one of the chapters). But if you really want the full monty you need probably Halsbury’s Laws of Australia. It is I think about 17 volumes. Happy reading…