A significant amount of undefined (and unexpected) behavior in C++ is inherited from C, for compatibility. You'd sooner use C, and fall into undefined behavior quickly as well.
C++ is large and hard to master, but I don't think UB is the best reason to choose C over it.