The reason is because Simulink is not real-time. You would need a time sychronisation block or a special target like simulink desktop real-time or ERT_linux etc. These targets generate C code which is then executed with a real-time scheduler which guarantees real-time.