Like Kafka's work in general, both of these stories seem examples of what we might subject to deconstruction or post-structuralist thinking and interpretation.
As I understand Jacques Derrida's thinking and his contribution to semiotics, a story is, or can be, interpreted as our understanding of things that seem to diverge from "intended meaning." In Kafka, this is applicable because the outward form of expression is a kind of cover for a subliminal message that appears to contradict a conventional interpretation of the events narrated.
In "The Judgement" (Das Urteil), the story makes less and less sense as it develops. The quiet description of a letter Georg has written to his friend in Russia develops into a catastrophic confrontation with Georg's father. It happens out of nowhere and does not even seem connected with the content of the story's opening, until we put the pieces together and, as it were, de-construct the elements. What has seemed the "intended meaning" turns into something quite different, and the impression made by the story is at least partly rooted in the disconnect between expected meaning and the meaning the story resolves itself into.
"In the Penal Colony" is a bit different, but it as well turns into something that diverges from the ostensible meaning presented to us from the start. When the Officer realizes that his intended method of execution is no longer to be accepted, he finds himself guilty and executes himself. A more expected (though an even more horrible) result would have been that the Traveller would be arrested and killed for daring not to give his assent to the Officer's use of the torture-execution apparatus. These particulars, however, pale beside the bizarre nature of the story as a whole.
In some ways, Kafka's narratives are so different from normal realism that the very essence of them is one in which the text seems to contain its own contradiction. We are shown things that make sense in an outward form but inwardly are nonsensical. Or, we could turn this formulation on its head and say that on the "outside," his fiction is absurd, but the inner meaning is valid and is grasped by the reader.
A deconstructionist approach to literature identifies our response to such stories as one in which we understand them by identifying meanings apart from the writer's ostensible purpose. Yet given the subsequent history of the twentieth century, Kafka's fiction does not appear all that bizarre after all. It may be a truism to note that the horrors of "In the Penal Colony" are a prophecy of the Holocaust, but this merely proves the validity of the interpretation—given how obvious the truth of it is.