Could the UK have simply left, legally, the EU on the 29th March given that leaving on that date was encoded in the Withdrawal Act?
It could have, had it not asked for an extension, which was eventually enshrined in domestic law.
UK's own MPs voted for an extension, first as an intention, which was then taken by the PM to the EU, which in turn approved it (the Council did) in a somewhat reduced form, which (in this EU-approved form) was then taken back to the UK and voted on again by the MPs as a Statutory Instrument legally modifying the departure date in domestic law.
At any of these steps someone (well, a majority in the case of Parliament votes) could have said just "no", which would have preserved the old departure date (29 March) as legally binding. As you can see most steps to amend the date were in the UK. Since the MPs also (non-bindingly) voted to reject an explicit no-deal Brexit, it's little surprise they voted for an extension (more than once).