The /setblock command will ignore the orientation of various blocks. Instead of orienting them based on the given data argument, the block will face south by default, and re-orient if it's placed against a wall. The data parameter is meant to specify the direction the block faces - when a block affected by this bug is placed, it will be placed with the wrong data value, completely ignoring the user-specified value.
Known blocks affected by this bug: Chest, Trapped Chest, Furnace, Dispenser, and Dropper.
This bug does not affect all directional blocks. For example, Hopper, Pumpkin, Sign (post), Torch, and Ladder are not affected by this bug.
Steps to Reproduce:
1. Run the command "/setblock ~ ~ ~ chest 0".
2. Observe that it faces south if no blocks are adjacent to it - otherwise it faces away from adjacent blocks.
3. Run the command again, but with '1' as the data value.
4. Observe that you get the same exact results.
5. Feel free to test all numeric values 0 through 15, as well as blocks other than "chest" (e.g. "furnace"), and observe that the behavior is the same.
Note: This bug relates to
MC-12437. If you wish to close this as a duplicate, please update MC-12437 to acknowledge that this bug happens for /setblock and happens in 13w38c. As of this posting, the ticket appears abandoned and not updated. Also, there's a notable difference between the two issues: /setblock has this issue even if no tile entity data is specified.