To be a witness is to have knowledge, understanding or wisdom. It is to attest to a fact or event or the action or condition of; being an observer of an event. Witness is also applied to the inward testimony of the conscience. When we bear witness we "show forth evidence of or as to an object of allegiance by faithful speech or conduct." Witness can also mean to furnish evidence or proof of something or to be a sign or mark of, or to betoken (Oxford English Dictionary).
Witness comes from the root meaning to look or to see. It also means the object of vision or to view. It has the sense of "someone who has firsthand knowledge of something" (The Roots of English).