Why fungi do not classifed under plant kingdom and pleaced in separate kingdom?

Earlier fungi were also classified in plnat kingdom. Now in modern classification these have been assingned a separate kingdom because their structure and function is quite different from rest of the plant kingdom.