We use closest representations for both of them, but they are not completely true.
$\frac{22}7$ and $3.14$ are not exactly $\pi$ but we use them as the best option available.
$\frac13$ is $0.\bar3$ but that can be $0.333$ or $0.333333$ and these are not equal.
So why is one irrational and other is not?
Something is irrational if its decimals go on forever and do so with no pattern. The number $\pi$ fits both of these criteria; however $1/3=0.333\cdots$ does not fit the second criterion because its digits repeat.
If numbers exhibit a pattern, it’s a clue to us that our decimal (base $10$) system represents them cleanly—and sure enough, when we look at the math, we see this is the case!