1) Not all bulkhead seats have extra legroom. Some actually have less.
2) The distance from the seat to the bulkhead is not the issue, since exit rows have long distances to the seats in front of them and the tray tables simply have extra long arms.
3) The issue is the structure of the bulkhead itself. Many are relatively thin walls and installing trays that fold into them would not be possible, often because there is not enough thickness for them to fit or because the trays would need a totally different design to be bolted to the outside of the bulkhead wall and would not have the same strength as those that fit into a seat back.