Firstly, you must understand how an engine plays chess, because if you don't you'll never understand why it's hard. Without going into too much technical details, an engine doesn't think. Even the most powerful chess engine in the world don't know how to play chess, they examine hundreds and thousands of positions. For each position, the engine uses some heuristic to derive a static evaluation for each position. The engine uses a technique known as alpha-beta to derive the overall optimal evaluation.
The key point to note that chess engine doesn't know how to play chess, it's simply a calculator. It doesn't know how to adjust itself from games, simply because it doesn't understand anything about chess.
It's very easy to tune down an engine's strength, but making it to play truly like a human is awfully hard. A chess engine never blunders, never forgets anything, never panic because you launch a king-side attack, never biased towards particular opponents etc. The way computer makes a move is simply very different to how you make a move.
I'll give you an example. Have you tried those weak playing levels in a chess app? Yes, you beat them easily, but that might be because they gave you a pawn for absolutely no reason and not under any pressure. Those engines were programmed to simulate blunders, but they couldn't simulate pressure, they just randomly blunder pawns and pieces. This is not a human play.
Programmers have tried to optimize an engine based on machine learning but with little success.