What are the general rules for faculty attendance?
It varies very widely depending on individual faculty, departmental, and institutional culture, norms, and rules.

For example, many faculty at my institution live in a city two hours away and only come to campus twice a week for classes and meetings. Faculty performance at my school is measured by lines on the CV, so one can argue that not going to school is a more productive use of time if you have a home office.

Meanwhile, while in Japan, I noted that some faculty had to punch timecards that showed their daily attendance. There, faculty performance seemed to be measured by the appearance if diligence rather than actual productivity.

On the extreme other end, adjunct faculty in the USA may not even have an office (or library privileges) to even have office hours.