Pears contain stone cells, which produce that gritty, grainy texture. They are cells with a thick cell wall that develop in pears when they ripen on the tree. This is the reason pears are picked before they are ripe, to avoid too many stone cells which would make the pears even more gritty.