Actually, even if in the textbooks in most cases the marginal product is always positive, it is not unusual to have a production function with negative marginal product, that is a total product function that, beyond a certain level, decreases with an increase of the input under consideration, say labor.
This kind of production function is a short period production function, where some input is fixed.
The graphs of the production function and of the marginal product, in this case, usually look as in the following picture, where the relationship among Total, Marginal and Average product function is shown:
As you can see, beyond the level $L=24$, the total production decreases and the marginal product becomes negative.
As an example of a microeconomic textbook where a similar production function is illustrated, you can see for instance Frank, Microeconomcs and Behavior.$^1$
But if you search on Google there are plenty of images of production function with negative marginal product
A reason why this can happen is the usual argument of the flower pot, that is an example of scarcity of an input in the short run, that illustrates the law of diminishing returns: it is not possible to grow the world’s food supply in a flower pot.
With an input, land, fixed at a low level (the flower pot) the increase of other inputs, say labor, rapidly cease to have a positive effect on the production of wheat: the efficiency of the production will decrease quickly (decreasing marginal product) and we can imagine a situation in which the production stops to grow and a level at which too many workers on the land can damage, instead of increasing, the production.
The reason why most textbooks present the positive part of marginal product only are formal reason, as pointed out in the answer by @1muflon1, and also economic reasons: a rational manager, as the wage is positive, will never decide to employ the input, labor, beyond the level $L=24$ in the picture.
So, it is reasonable to consider the part of the production function with positive marginal product only.$^2$
$^1$ Unfortunately, I have the Italian edition of Frank's book only, so I can't cite the pages of the English edition. For the Italian edition, see Frank, Microeconomia, Fourth Edition, Mac Graw-Hill, 2006, pp. 265-266.
$^2$ See Ibid., pp. 262-263.