Almost every country in the world requires a landing card. (Some also require exit cards.) One answer as to why might be "because it's the law" but an "ask why 5 times" spirit could ask "Why is it the law?" You seem also to be asking "why hasn't it been replaced with something electronic?"
Every country asks slightly different things. Some are questions that are important to protect the agriculture and economy of the country:
- have you been on a farm recently? Are you planning to visit a farm?
- are you coming here for business, tourism, or study?
- what is the value of the goods you are bringing into the country?
Some are questions that can be used for statistical purposes:
- what is your profession?
- are you planning to (list of tourist activities)?
These are not things that can just be looked up in some giant online database of people and cross referenced against the plane's passenger list. If they don't ask you, they won't know. And they want to know.
I suppose you could try asking passengers to install an app and take a survey electronically, but airports especially are full of folks who left their phone behind because it won't work in the destination country, or who used up all their battery during the flight, or other issues that would no doubt require a paper backup anyway. Cards are easy to keep stacks of on planes and at counters in the airport, easy enough to fill out, and officers can add notations to them quite simply. In Canada the way they made it electronic is to write software that scans the cards, not to replace the cards with something electronic.
A tip if you feel pressured filling your card out - take a spare and take it home with you. Before your next trip you can fill out that vast majority of it in advance. When they hand you the blank one, that's for the trip after that - take out your prepared one and just fill in the last bits. I do this for US trips where I have to preclear in Canada - they don't give you the card until you're about to join the lineup so I like having one at home I can fill out in advance.