I've noticed that you get experience orbs from mining coal, redstone and diamond. However, you do not get any from mining iron. Is there a reason behind this, or is it a bug?
You only get experience from non repeatable processes. If you could get exp from mining iron you could just mine a block, place it back down, then mine it again for more XP. When you mine coal, redstone, diamonds, or other blocks that drop a item when you break it you can't place the original block back and keep farming the XP.
For blocks that drop blocks (like iron) you need to smelt the iron in a furnace to get the xp reward as that is the "non repeatable" step in getting the iron.