TL;DR
Glazed terracotta (and some other blocks) get placed backwards from how they look in the hand. It makes it unintuitive to place.
[media](arrow points backwards in hand but forwards in world, opposite of blocks like furnaces)
Background
Various blocks can be placed in multiple orientations based on the player's rotation (chests, pistons, etc). For most of these blocks, the side that will be facing the player when placed is positioned like so:
Facing towards the player in first-person
Facing away from the player (on the inner side) in third-person
On the right half of the GUI icon
Facing straight out in an item frame
[media][media]
This is illustrated in the following two images:
The bug
Some blocks do not follow this convention for one or more models, resulting in unintuitive or confusing placement.
✔ = matches most blocks
❌ = affected by this issue
First person is most relevant since it defines your intuition for block placement, but I've included blocks that are unusual in third person for the sake of completeness.
Block | First Person | GUI | Third Person |
---|---|---|---|
Glazed terracotta | ❌ 180° | ❌ 180° | ❌ 180° |
Observer (see note*) | ❌ 90° | ❌ 180° | ❌ 180° |
Piston/sticky piston | ❌ | ❌ | ❌ |
Fence gate | ❌ | ✔ | ✔ |
End portal frame | ❌ 90° | ✔ | ✔ |
Banner | ❌ 90° | ✔ | ✔ |
Command block | ❌ 90° | ✔ | ✔ |
Chiseled bookshelf | ❌ 90° | ✔ | ✔ |
Stonecutter | ❌ 90° | ✔ | ✔ |
Trapdoor | ❌ 90° | ✔ | ✔ |
Button | ❌ 90° | ✔ | ❌ |
Stairs | ✔ | ✔ | ❌ |
Skull | ✔ | ✔ | ❌ |
Chests | ✔ | ✔ | ❌ |
Anvil | ✔ | ❌ | ❌ |
Big Dripleaf | ❌ | ✔ | ❌ |
Small Dripleaf | ❌ | ✔ | ❌ |
Decorated Pot | ❌ | ✔ | ❌ |
Calibrated Sculk Sensor | ❌ | ✔ | ❌ |
Grindstone | ❌ | ✔ | ❌ |
Crafter | ❌ | ✔ | ✔ |
Vault | ❌ | ✔ | ✔ |
Attached are images of affected blocks in the contexts in which they appear inconsistent, with a before ("Vanilla") and after ("Fixed") image.
(* Rotating the observer in the GUI makes it look rather strange, so a more correct fix may be to alter its placement so that the "face" faces the player when placed instead of the back.)
One more thing
Blocks that "attach" to the face you click on (logs, shulker boxes...) follow a convention where the model is oriented vertically. However, jigsaw blocks do not follow this convention and are also confusing to place.
Related issues
is duplicated by
relates to
Attachments
Comments

Also affects buttons and trapdoors as of 17w47a. Will update later.
This affects the loom too. More info in MC-137761
As of 19w04a the stonecutter is also affected (only first person perspective)

Affects 1.16.3
Can confirm in 20w49a.

Affects 21w18a

Can confirm in 1.17.1 and 21w42a.

Can confirm in 1.18 Pre-release 1.

Can confirm in 1.18 and 1.18.1 Pre-release 1.

Can confirm in 1.18.1.

Can confirm in 1.18.2.
As of snapshot 23w31a I have found more blocks that are affected.
Here is the raw text to update the post:
|Big Dripleaf|(x)|(/)|(x)|
|Small Dripleaf|(x)|(/)|(x)|
|Deccorated Pot|(x)|(/)|(x)|
|Calibrated Sculk Sensor|(x)|(/)|(x)|
|Grindstone|(x)|(/)|(x)|
The loom is affected as pointed out by trysahtar in a comment, but not added to the list yet.
|Loom| (/) | (/) | (x) |

As of 1.20.5 Release Candidate 2 there are a couple new blocks affected:
Crafter | ❌ | ✔ | ✔ |
Vault | ❌ | ✔ | ✔ |
|Crafter|(x)|(/)|(/)|
|Vault|(x)|(/)|(/)|

Affects 1.21, 1.21.1, & 24w34a.
The barrel is also affected by this. This is the same case as the piston though and could be WAI:
Barrel | ❌ | ❌ | ❌ |
|Barrel|(x)|(x)|(x)|

After reviewing the list I have made a few observations.
Correct me if I'm wrong but it seems that Buttons and Looms are correct in 3rd person
Grindstones are not correct at all. (item icon and third person are backwards and first person is sideways)
[media][media]Fences don't look correct in 3rd person
[media]Code for all changes:
|Fences|(/)|(/)|(x)|
|Grindstone|(x)|(x)|(x)|
|Button|(x)|(/)|(/)|
|Loom|(/)|(/)|(/)| (Remove from list)
The loom was fixed with the fix of MC-137761. Thanks, I've removed it. I also want to add the number of degrees each model is off by. I added some, but got lazy and didn't finish, and I didn't distinguish between 90 and -90.