Why do the advisor and the elephant never leave their own half of the board?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws for movement, checkmate and both repetition rulings: a side that forces a repetition by perpetual check or perpetual chase loses rather than drawing. The chase half has not been validated against the official casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it before publishing.
Direct answer
Because their movement rules confine them there absolutely. The advisor can only ever stand on five points inside its own palace, and the elephant can never cross the river under any circumstances. Apart from the general, they are the only piece types in xiangqi that can never, in any game, set foot on the opponent's half of the board, which is exactly why they are considered purely defensive.
What this design achieves
Every attacking piece, the chariot, the horse, the cannon, and a crossed soldier, can reach the enemy palace. The advisor and elephant cannot, and that asymmetry is deliberate: it guarantees every game keeps a fixed defensive core near each general, rather than a position ever being stripped down to nothing but attackers on both sides.
The practical upshot
Because these two pieces can never join an attack on the opponent, moving them is only ever about improving or weakening your own defence, never about threatening anything across the river. A wasted advisor or elephant move gains nothing at all, unlike a wasted move by any other piece, which at least advances toward the opponent.
Related questions
Is one of the two more restricted than the other?
The advisor is more restricted; it reaches only five points total, while the elephant reaches seven, but both are confined to home territory for the whole game.
Do both pieces still matter in the endgame if they can't attack?
Yes, enormously, a defence with both intact holds positions that a defence missing one or both simply loses.