Hm, curious. In Germany (and Austria, wherefrom I got my N9), it is perfectly fine to buy a phone. What you cannot do (legally) is buy a SIM card without ID – however, most shops just require you to fill in some form and don’t bother checking any form of ID.