Why is this “jeden”, when another example was “jedem”
It depends on case. Look at the top right table here: jeder – Wiktionary